AppListController { @GET @Produces(MediaType.APPLICATION_JSON) public List<AppEntry> getList() { AppCatalogSolrClient sc = new AppCatalogSolrClient(); return sc.listAppEntries(); } AppListController(); @GET @Produces(MediaType.APPLICATION_JSON) List<AppEntry> getList(); @DELETE @Path("{id}/{name}") @Produces(MediaType.APPLICATION_JSON) Response delete(@PathParam("id") String id,
      @PathParam("name") String name); @POST @Path("{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response deploy(@PathParam("id") String id, Service service);  }
@Test public void testGetList() throws Exception { AppListController ac = Mockito.mock(AppListController.class); List<AppEntry> actual = new ArrayList<AppEntry>(); when(ac.getList()).thenReturn(actual); final List<AppEntry> result = ac.getList(); assertEquals(result, actual); }