ModificationNotificationResource { @PUT @ApiOperation(value = "Acknowledge a modification notification", response = Response.class) @ApiResponses(value = { @ApiResponse(code = 204, message = "Successful acknowledge of ModificationNotification"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Path("/{notificationId}") @Consumes(MediaType.APPLICATION_JSON) public Response acknowledgeNotification( @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId, @ApiParam(required = true, value = "Notification id") @PathParam("notificationId") int notificationId, @ApiParam(required = true, value = "Modification notification to acknowledge") ModificationNotificationDTO notificationDTO) throws EntityNotFoundException, AccessRightException, WorkspaceNotEnabledException { productService.updateModificationNotification(workspaceId, notificationId, notificationDTO.getAckComment()); return Response.noContent().build(); } ModificationNotificationResource(); @PUT @ApiOperation(value = "Acknowledge a modification notification", response = Response.class) @ApiResponses(value = { @ApiResponse(code = 204, message = "Successful acknowledge of ModificationNotification"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Path("/{notificationId}") @Consumes(MediaType.APPLICATION_JSON) Response acknowledgeNotification(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId,
            @ApiParam(required = true, value = "Notification id") @PathParam("notificationId") int notificationId,
            @ApiParam(required = true, value = "Modification notification to acknowledge") ModificationNotificationDTO notificationDTO);  }
@Test public void acknowledgeNotificationTest() throws EntityNotFoundException, WorkspaceNotEnabledException, AccessRightException { ModificationNotificationDTO notificationDTO = new ModificationNotificationDTO(); Mockito.doNothing().when(productService).updateModificationNotification(Matchers.anyString(), Matchers.anyInt(), Matchers.anyString()); Response res = modificationNotificationResource.acknowledgeNotification("wks", 0, notificationDTO); Assert.assertEquals(Response.Status.NO_CONTENT.getStatusCode(), res.getStatus()); }