@Override
  public ApplicationAttemptReport getApplicationAttemptReport(
      ApplicationAttemptId applicationAttemptId)
      throws YarnException, IOException {
    TimelineEntity entity = readerClient.getApplicationAttemptEntity(
        applicationAttemptId, "ALL", null);
    return TimelineEntityV2Converter.convertToApplicationAttemptReport(entity);
  }
@Test
  public void testGetAppAttemptReport() throws IOException, YarnException {
    final ApplicationId appId = ApplicationId.newInstance(0, 1);
    final ApplicationAttemptId appAttemptId =
        ApplicationAttemptId.newInstance(appId, 1);
    when(spyTimelineReaderClient.getApplicationAttemptEntity(appAttemptId,
        "ALL", null))
        .thenReturn(createAppAttemptTimelineEntity(appAttemptId));
    ApplicationAttemptReport report =
        client.getApplicationAttemptReport(appAttemptId);
    assertThat(report.getApplicationAttemptId()).isEqualTo(appAttemptId);
    assertThat(report.getFinishTime()).isEqualTo(Integer.MAX_VALUE + 2L);
    assertThat(report.getOriginalTrackingUrl()).
        isEqualTo("test original tracking url");
  }