public Map<String, String> getTasksStates(String taskType)
      throws IOException, HttpException {
    HttpGet httpGet = createHttpGetRequest(MinionRequestURLBuilder.baseUrl(_controllerUrl).forTasksStates(taskType));
    try (CloseableHttpResponse response = HTTP_CLIENT.execute(httpGet)) {
      int statusCode = response.getCode();
      final String responseString = IOUtils.toString(response.getEntity().getContent());
      if (statusCode >= 400) {
        throw new HttpException(
            String.format("Unable to get tasks states map. Error code %d, Error message: %s", statusCode,
                responseString));
      }
      return JsonUtils.stringToObject(responseString, TYPEREF_MAP_STRING_STRING);
    }
  }
@Test
  public void testTasksStates()
      throws IOException, HttpException {
    HttpServer httpServer = startServer(14203, "/tasks/SegmentGenerationAndPushTask/taskstates",
        createHandler(200, "{\"Task_SegmentGenerationAndPushTask_1607470525615\":\"IN_PROGRESS\"}", 0));
    MinionClient minionClient = new MinionClient("http://localhost:14203", null);
    Assert.assertEquals(minionClient.getTasksStates("SegmentGenerationAndPushTask")
        .get("Task_SegmentGenerationAndPushTask_1607470525615"), "IN_PROGRESS");
    httpServer.stop(0);
  }