@Test public void testDelete() throws Exception { final Response response = resources.client().target("/v1/rules/follow").request(MediaType.APPLICATION_JSON).delete(); verify(store).remove("follow"); assertThat(response.getStatus()).isEqualTo(204); }
@DELETE @Timed @Path("/{category}") public Response delete(@PathParam("category") final String category) { try { store.remove(category); } catch (NotificationStoreException e) { throw new NotificationException( Response.Status.INTERNAL_SERVER_ERROR, "Unable to remove rule", e); } return Response.noContent().build(); }
RuleResource { @DELETE @Timed @Path("/{category}") public Response delete(@PathParam("category") final String category) { try { store.remove(category); } catch (NotificationStoreException e) { throw new NotificationException( Response.Status.INTERNAL_SERVER_ERROR, "Unable to remove rule", e); } return Response.noContent().build(); } }
RuleResource { @DELETE @Timed @Path("/{category}") public Response delete(@PathParam("category") final String category) { try { store.remove(category); } catch (NotificationStoreException e) { throw new NotificationException( Response.Status.INTERNAL_SERVER_ERROR, "Unable to remove rule", e); } return Response.noContent().build(); } RuleResource(final RuleStore store); }
RuleResource { @DELETE @Timed @Path("/{category}") public Response delete(@PathParam("category") final String category) { try { store.remove(category); } catch (NotificationStoreException e) { throw new NotificationException( Response.Status.INTERNAL_SERVER_ERROR, "Unable to remove rule", e); } return Response.noContent().build(); } RuleResource(final RuleStore store); @GET @JSONP @Timed @Produces({MediaType.APPLICATION_JSON, "application/javascript"}) @CacheControl(mustRevalidate = true, noCache = true, noStore = true) Response fetch(); @PUT @Timed @Path("/{category}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response store(
      @PathParam("category") final String category, @NotNull @Valid final Rule rule); @DELETE @Timed @Path("/{category}") Response delete(@PathParam("category") final String category); @DELETE @Timed Response delete(); }
RuleResource { @DELETE @Timed @Path("/{category}") public Response delete(@PathParam("category") final String category) { try { store.remove(category); } catch (NotificationStoreException e) { throw new NotificationException( Response.Status.INTERNAL_SERVER_ERROR, "Unable to remove rule", e); } return Response.noContent().build(); } RuleResource(final RuleStore store); @GET @JSONP @Timed @Produces({MediaType.APPLICATION_JSON, "application/javascript"}) @CacheControl(mustRevalidate = true, noCache = true, noStore = true) Response fetch(); @PUT @Timed @Path("/{category}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response store(
      @PathParam("category") final String category, @NotNull @Valid final Rule rule); @DELETE @Timed @Path("/{category}") Response delete(@PathParam("category") final String category); @DELETE @Timed Response delete();  }