public synchronized Map<String, Object> getSubtaskOnWorkerProgress(String subtaskState, Executor executor,
      HttpClientConnectionManager connMgr, Map<String, String> selectedMinionWorkerEndpoints,
      Map<String, String> requestHeaders, int timeoutMs)
      throws JsonProcessingException {
    return getSubtaskOnWorkerProgress(subtaskState, new CompletionServiceHelper(executor, connMgr, HashBiMap.create(0)),
        selectedMinionWorkerEndpoints, requestHeaders, timeoutMs);
  }
@Test
  public void testGetSubtaskWithGivenStateProgressNoWorker()
      throws JsonProcessingException {
    CompletionServiceHelper httpHelper = mock(CompletionServiceHelper.class);
    PinotHelixTaskResourceManager mgr =
        new PinotHelixTaskResourceManager(mock(PinotHelixResourceManager.class), mock(TaskDriver.class));
    // No worker to run subtasks.
    Map<String, String> selectedMinionWorkerEndpoints = new HashMap<>();
    Map<String, Object> progress =
        mgr.getSubtaskOnWorkerProgress("IN_PROGRESS", httpHelper, selectedMinionWorkerEndpoints, Collections.emptyMap(),
            1000);
    assertTrue(progress.isEmpty());
    verify(httpHelper, Mockito.never()).doMultiGetRequest(any(), any(), anyBoolean(), any(), anyInt());
  }