@Test public void shouldDeleteACurrentUserNotification() { final Response response = target().path("notifications").path("ID").request().delete(); assertEquals(HttpStatusCode.NO_CONTENT_204, response.getStatus()); Mockito.verify(portalNotificationService).delete("ID"); }
@Path("{notificationId}") @DELETE public Response delete(@PathParam("notificationId") String notificationId) { portalNotificationService.findById(notificationId); portalNotificationService.delete(notificationId); return Response .status(Response.Status.NO_CONTENT) .build(); }
UserNotificationsResource extends AbstractResource { @Path("{notificationId}") @DELETE public Response delete(@PathParam("notificationId") String notificationId) { portalNotificationService.findById(notificationId); portalNotificationService.delete(notificationId); return Response .status(Response.Status.NO_CONTENT) .build(); } }
UserNotificationsResource extends AbstractResource { @Path("{notificationId}") @DELETE public Response delete(@PathParam("notificationId") String notificationId) { portalNotificationService.findById(notificationId); portalNotificationService.delete(notificationId); return Response .status(Response.Status.NO_CONTENT) .build(); }  }
UserNotificationsResource extends AbstractResource { @Path("{notificationId}") @DELETE public Response delete(@PathParam("notificationId") String notificationId) { portalNotificationService.findById(notificationId); portalNotificationService.delete(notificationId); return Response .status(Response.Status.NO_CONTENT) .build(); }  @GET @Produces(MediaType.APPLICATION_JSON) Response getCurrentUserNotifications(@BeanParam PaginationParam paginationParam); @DELETE Response deleteAll(); @Path("{notificationId}") @DELETE Response delete(@PathParam("notificationId") String notificationId); }
UserNotificationsResource extends AbstractResource { @Path("{notificationId}") @DELETE public Response delete(@PathParam("notificationId") String notificationId) { portalNotificationService.findById(notificationId); portalNotificationService.delete(notificationId); return Response .status(Response.Status.NO_CONTENT) .build(); }  @GET @Produces(MediaType.APPLICATION_JSON) Response getCurrentUserNotifications(@BeanParam PaginationParam paginationParam); @DELETE Response deleteAll(); @Path("{notificationId}") @DELETE Response delete(@PathParam("notificationId") String notificationId);  }