### Question:
GetBufferedAIDRData implements ServletContextListener { @GET @Path("/channels/list") @Produces("text/html") public Response getActiveChannelsList() { Set<String> channelList = cbManager.getActiveChannelsList(); StringBuilder htmlMessageString = new StringBuilder(); htmlMessageString.append("<!DOCTYPE html>"); htmlMessageString.append("<html>"); htmlMessageString.append("<head><title>REDIS PUBSUB Channel Data Output Service</title></head>"); htmlMessageString.append("<body>"); htmlMessageString.append("<p><big>Available active channels: </big></p>"); htmlMessageString.append("<ul>"); if (channelList != null) { Iterator<String> itr = channelList.iterator(); while (itr.hasNext()) { htmlMessageString.append("<li>" + itr.next().substring(CHANNEL_PREFIX_STRING.length()) + "</li>"); } } htmlMessageString.append("</body></html>"); return Response.ok(htmlMessageString.toString()).build(); }  @GET @Path("/channels/list") @Produces("text/html") Response getActiveChannelsList(); @GET @Path("/channels/latest") @Produces("application/json") Response getLatestBufferedAIDRData(@QueryParam("callback") String callbackName,
			@DefaultValue("1") @QueryParam("count") Integer count,
			@DefaultValue("0.7") @QueryParam("confidence") Float confidence,
			@DefaultValue("true") @QueryParam("balanced_sampling") Boolean balanced_sampling); @GET @Path("/channel/{crisisCode}") @Produces({"application/json"}) Response getBufferedAIDRData(@PathParam("crisisCode") String channelCode,
			@QueryParam("callback") String callbackName,
			@DefaultValue("1000") @QueryParam("count") int count); @OPTIONS @Produces(MediaType.APPLICATION_JSON) @Path("/channel/filter/{crisisCode}") Response getBufferedAIDRDataPostFilter(@PathParam("crisisCode") String channelCode,
			@QueryParam("callback") String callbackName,
			@DefaultValue("1000") @QueryParam("count") int count); @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Path("/channel/filter/{crisisCode}") Response getBufferedAIDRDataPostFilter(String queryString, @PathParam("crisisCode") String channelCode,
			@QueryParam("callback") String callbackName,
			@DefaultValue("1000") @QueryParam("count") int count); Response returnEmptyJson(final String callbackName); boolean isChannelPresent(String channel); @GET @Path("/channel/error/{crisisCode}") @Produces({"text/html"}) Response onErrorResponse(); @GET @Path("/manage/restart/{passcode}") @Produces("application/json") Response restartFetchService(@PathParam("passcode") String passcode); @POST @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.APPLICATION_JSON) @Path("/channel/test/{crisisCode}") Response testPost(String testString, @PathParam("crisisCode") String channelCode); @GET @Path("/channel/test/jsonmap") Response testJsonMap(); @GET @Path("/channel/test/channelpublic") Response testChannelPublicFlag(@QueryParam("channelCode") String channelCode); @Override void contextDestroyed(ServletContextEvent sce); @Override void contextInitialized(ServletContextEvent sce);  }### Answer:
@Test public void getActiveChannelsListTest() { Response response = getBufferedAIDRData.getActiveChannelsList(); String statusString = (String)response.getEntity(); System.out.println(statusString); assertNotNull(statusString); assertFalse(statusString.contains("mock_collection"+new Date())); }