@Test @SuppressWarnings("rawtypes") public void testDeleteAll() { final Response r1 = target("/").request().delete(); assertNotNull(r1); final Response r2 = target("/").request().get(); assertNotNull(r2); assertTrue(((Collection) r2.getEntity()).isEmpty()); }
@DELETE public Response delete() { posts.clear(); return Response.ok().build(); }
TodoBackend { @DELETE public Response delete() { posts.clear(); return Response.ok().build(); } }
TodoBackend { @DELETE public Response delete() { posts.clear(); return Response.ok().build(); }  }
TodoBackend { @DELETE public Response delete() { posts.clear(); return Response.ok().build(); }  @GET Collection<Post> read(); @POST @Consumes(APPLICATION_JSON) Response create(@Context final UriInfo uriInfo, final Post post); @DELETE Response delete(); @GET @Path("/{id}") Post read(@PathParam("id") final int id); @PATCH @Path("/{id}") @Consumes(APPLICATION_JSON) Post update(@PathParam("id") final int id, final Post updated); @DELETE @Path("/{id}") Response delete(@PathParam("id") final int id); static void main(final String[] args); }
TodoBackend { @DELETE public Response delete() { posts.clear(); return Response.ok().build(); }  @GET Collection<Post> read(); @POST @Consumes(APPLICATION_JSON) Response create(@Context final UriInfo uriInfo, final Post post); @DELETE Response delete(); @GET @Path("/{id}") Post read(@PathParam("id") final int id); @PATCH @Path("/{id}") @Consumes(APPLICATION_JSON) Post update(@PathParam("id") final int id, final Post updated); @DELETE @Path("/{id}") Response delete(@PathParam("id") final int id); static void main(final String[] args);  }