DynamicAnnouncementResource { @DELETE public Response delete(@PathParam("node_id") Id<Node> nodeId) { dynamicStore.delete(nodeId); return Response.noContent().build(); } @Inject  DynamicAnnouncementResource(DynamicStore dynamicStore, NodeInfo nodeInfo); @PUT @Consumes(MediaType.APPLICATION_JSON) Response put(@PathParam("node_id") Id<Node> nodeId, @Context UriInfo uriInfo, DynamicAnnouncement announcement); @DELETE Response delete(@PathParam("node_id") Id<Node> nodeId);  }
@Test public void testDeleteMissing() { Response response = resource.delete(Id.<Node>random()); assertNotNull(response); assertEquals(response.getStatus(), Response.Status.NO_CONTENT.getStatusCode()); assertTrue(store.getAll().isEmpty()); }