AHSv2ClientImpl extends AHSClient { @Override public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnException, IOException { TimelineEntity entity = readerClient.getApplicationEntity( appId, "ALL", null); return TimelineEntityV2Converter.convertToApplicationReport(entity); } AHSv2ClientImpl(); @Override void serviceInit(Configuration conf); @Override void serviceStart(); @Override void serviceStop(); @Override ApplicationReport getApplicationReport(ApplicationId appId); @Override List<ApplicationReport> getApplications(); @Override ApplicationAttemptReport getApplicationAttemptReport(
      ApplicationAttemptId applicationAttemptId); @Override List<ApplicationAttemptReport> getApplicationAttempts(
      ApplicationId applicationId); @Override ContainerReport getContainerReport(ContainerId containerId); @Override List<ContainerReport> getContainers(ApplicationAttemptId
      applicationAttemptId);  }
@Test public void testGetAppReport() throws IOException, YarnException { final ApplicationId appId = ApplicationId.newInstance(0, 1); when(spyTimelineReaderClient.getApplicationEntity(appId, "ALL", null)) .thenReturn(createApplicationTimelineEntity(appId, false, false)); ApplicationReport report = client.getApplicationReport(appId); assertThat(report.getApplicationId()).isEqualTo(appId); assertThat(report.getAppNodeLabelExpression()). isEqualTo("test_node_label"); Assert.assertTrue(report.getApplicationTags().contains("Test_APP_TAGS_1")); assertThat(report.getYarnApplicationState()). isEqualTo(YarnApplicationState.FINISHED); }