@Override
  public List<TimelineEntity> getApplicationAttemptEntities(
      ApplicationId appId, String fields, Map<String, String> filters,
      long limit, String fromId) throws IOException {
    String path = PATH_JOINER.join("clusters", clusterId, "apps",
        appId, "entities", YARN_APPLICATION_ATTEMPT);

    if (fields == null || fields.isEmpty()) {
      fields = "INFO";
    }
    MultivaluedMap<String, String> params = new MultivaluedMapImpl();
    params.add("fields", fields);
    if (limit > 0) {
      params.add("limit", Long.toString(limit));
    }
    if (fromId != null && !fromId.isEmpty()) {
      params.add("fromid", fromId);
    }
    mergeFilters(params, filters);

    ClientResponse response = doGetUri(baseUri, path, params);
    TimelineEntity[] entities = response.getEntity(TimelineEntity[].class);
    return Arrays.asList(entities);
  }
@Test
  void getApplicationAttemptEntities() throws Exception {
    ApplicationId applicationId =
        ApplicationId.fromString("application_1234_0001");
    List<TimelineEntity> entities =
        client.getApplicationAttemptEntities(applicationId, null,
            null, 0, null);
    assertEquals(2, entities.size());
    assertEquals("mockAppAttempt2", entities.get(1).getId());
  }