AHSWebServices extends WebServices { @GET @Path("/about") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public TimelineAbout about( @Context HttpServletRequest req, @Context HttpServletResponse res) { init(res); return TimelineUtils.createTimelineAbout("Generic History Service API"); } @Inject  AHSWebServices(ApplicationBaseProtocol appBaseProt); @GET @Path("/about") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) TimelineAbout about(
      @Context HttpServletRequest req,
      @Context HttpServletResponse res); @GET @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) AppsInfo get(@Context HttpServletRequest req,
      @Context HttpServletResponse res); @GET @Path("/apps") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override AppsInfo getApps(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @QueryParam("state") String stateQuery,
      @QueryParam("states") Set<String> statesQuery,
      @QueryParam("finalStatus") String finalStatusQuery,
      @QueryParam("user") String userQuery,
      @QueryParam("queue") String queueQuery,
      @QueryParam("limit") String count,
      @QueryParam("startedTimeBegin") String startedBegin,
      @QueryParam("startedTimeEnd") String startedEnd,
      @QueryParam("finishedTimeBegin") String finishBegin,
      @QueryParam("finishedTimeEnd") String finishEnd,
      @QueryParam("applicationTypes") Set<String> applicationTypes); @GET @Path("/apps/{appid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override AppInfo getApp(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @PathParam("appid") String appId); @GET @Path("/apps/{appid}/appattempts") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override AppAttemptsInfo getAppAttempts(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @PathParam("appid") String appId); @GET @Path("/apps/{appid}/appattempts/{appattemptid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override AppAttemptInfo getAppAttempt(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @PathParam("appid") String appId,
      @PathParam("appattemptid") String appAttemptId); @GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override ContainersInfo getContainers(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @PathParam("appid") String appId,
      @PathParam("appattemptid") String appAttemptId); @GET @Path("/apps/{appid}/appattempts/{appattemptid}/containers/{containerid}") @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Override ContainerInfo getContainer(@Context HttpServletRequest req,
      @Context HttpServletResponse res, @PathParam("appid") String appId,
      @PathParam("appattemptid") String appAttemptId,
      @PathParam("containerid") String containerId);  }
@Test public void testAbout() throws Exception { WebResource r = resource(); ClientResponse response = r .path("ws").path("v1").path("applicationhistory").path("about") .queryParam("user.name", USERS[round]) .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getType()); TimelineAbout actualAbout = response.getEntity(TimelineAbout.class); TimelineAbout expectedAbout = TimelineUtils.createTimelineAbout("Generic History Service API"); Assert.assertNotNull( "Timeline service about response is null", actualAbout); Assert.assertEquals(expectedAbout.getAbout(), actualAbout.getAbout()); Assert.assertEquals(expectedAbout.getTimelineServiceVersion(), actualAbout.getTimelineServiceVersion()); Assert.assertEquals(expectedAbout.getTimelineServiceBuildVersion(), actualAbout.getTimelineServiceBuildVersion()); Assert.assertEquals(expectedAbout.getTimelineServiceVersionBuiltOn(), actualAbout.getTimelineServiceVersionBuiltOn()); Assert.assertEquals(expectedAbout.getHadoopVersion(), actualAbout.getHadoopVersion()); Assert.assertEquals(expectedAbout.getHadoopBuildVersion(), actualAbout.getHadoopBuildVersion()); Assert.assertEquals(expectedAbout.getHadoopVersionBuiltOn(), actualAbout.getHadoopVersionBuiltOn()); }