@Test public void findById() throws Exception { CassandraInstance instance = createMock(CassandraInstance.class); expect(service.findById(RING_NAME, CASSANDRA_ID)).andReturn(instance); replayAll(); assertEquals(instance, resource.findById(CASSANDRA_ID)); }
@GET @Path("{id}") public CassandraInstance findById(@PathParam("id") int id) { return getByIdIfFound(id); }
CassandraInstanceResource { @GET @Path("{id}") public CassandraInstance findById(@PathParam("id") int id) { return getByIdIfFound(id); } }
CassandraInstanceResource { @GET @Path("{id}") public CassandraInstance findById(@PathParam("id") int id) { return getByIdIfFound(id); } @Inject  CassandraInstanceResource(CassandraInstanceService service, @Assisted CassandraRing ring); }
CassandraInstanceResource { @GET @Path("{id}") public CassandraInstance findById(@PathParam("id") int id) { return getByIdIfFound(id); } @Inject  CassandraInstanceResource(CassandraInstanceService service, @Assisted CassandraRing ring); @GET Set<CassandraInstance> findAll(); @POST Response createInstance(@Valid CassandraInstance instance); @GET @Path("{id}") CassandraInstance findById(@PathParam("id") int id); @DELETE @Path("{id}") Response deleteInstance(@PathParam("id") int id); }
CassandraInstanceResource { @GET @Path("{id}") public CassandraInstance findById(@PathParam("id") int id) { return getByIdIfFound(id); } @Inject  CassandraInstanceResource(CassandraInstanceService service, @Assisted CassandraRing ring); @GET Set<CassandraInstance> findAll(); @POST Response createInstance(@Valid CassandraInstance instance); @GET @Path("{id}") CassandraInstance findById(@PathParam("id") int id); @DELETE @Path("{id}") Response deleteInstance(@PathParam("id") int id);  }