@Test public void findByName() throws Exception { CassandraRing ring = createMock(CassandraRing.class); expect(service.findByName(RING_NAME)).andReturn(ring); replayAll(); assertEquals(ring, resource.findByName(RING_NAME)); }
@GET @Path("{name}") public CassandraRing findByName(@PathParam("name") String name) { return getByNameIfFound(name); }
CassandraRingResource { @GET @Path("{name}") public CassandraRing findByName(@PathParam("name") String name) { return getByNameIfFound(name); } }
CassandraRingResource { @GET @Path("{name}") public CassandraRing findByName(@PathParam("name") String name) { return getByNameIfFound(name); } @Inject  CassandraRingResource(CassandraRingService service,
      CassandraInstanceResourceFactory instanceResourceFactory,
      SeedResourceFactory seedResourceFactory); }
CassandraRingResource { @GET @Path("{name}") public CassandraRing findByName(@PathParam("name") String name) { return getByNameIfFound(name); } @Inject  CassandraRingResource(CassandraRingService service,
      CassandraInstanceResourceFactory instanceResourceFactory,
      SeedResourceFactory seedResourceFactory); @GET Set<CassandraRing> findAll(); @POST Response createRing(@Valid CassandraRing ring); @GET @Path("{name}") CassandraRing findByName(@PathParam("name") String name); @DELETE @Path("{name}") Response deleteRing(@PathParam("name") String name); @Path("{name}/instances") CassandraInstanceResource getCassandraInstanceResource(@PathParam("name") String name); @Path("{name}/seeds") SeedResource getSeedResource(@PathParam("name") String name); }
CassandraRingResource { @GET @Path("{name}") public CassandraRing findByName(@PathParam("name") String name) { return getByNameIfFound(name); } @Inject  CassandraRingResource(CassandraRingService service,
      CassandraInstanceResourceFactory instanceResourceFactory,
      SeedResourceFactory seedResourceFactory); @GET Set<CassandraRing> findAll(); @POST Response createRing(@Valid CassandraRing ring); @GET @Path("{name}") CassandraRing findByName(@PathParam("name") String name); @DELETE @Path("{name}") Response deleteRing(@PathParam("name") String name); @Path("{name}/instances") CassandraInstanceResource getCassandraInstanceResource(@PathParam("name") String name); @Path("{name}/seeds") SeedResource getSeedResource(@PathParam("name") String name);  }