@Test public void deleteRing() throws Exception { CassandraRing ring = createMock(CassandraRing.class); expect(service.findByName(RING_NAME)).andReturn(ring); service.delete(ring); replayAll(); Response response = resource.deleteRing(RING_NAME); assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus()); }
@DELETE @Path("{name}") public Response deleteRing(@PathParam("name") String name) { service.delete(getByNameIfFound(name)); return Response.noContent().build(); }
CassandraRingResource { @DELETE @Path("{name}") public Response deleteRing(@PathParam("name") String name) { service.delete(getByNameIfFound(name)); return Response.noContent().build(); } }
CassandraRingResource { @DELETE @Path("{name}") public Response deleteRing(@PathParam("name") String name) { service.delete(getByNameIfFound(name)); return Response.noContent().build(); } @Inject  CassandraRingResource(CassandraRingService service,
      CassandraInstanceResourceFactory instanceResourceFactory,
      SeedResourceFactory seedResourceFactory); }
CassandraRingResource { @DELETE @Path("{name}") public Response deleteRing(@PathParam("name") String name) { service.delete(getByNameIfFound(name)); return Response.noContent().build(); } @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 { @DELETE @Path("{name}") public Response deleteRing(@PathParam("name") String name) { service.delete(getByNameIfFound(name)); return Response.noContent().build(); } @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);  }