LOVResource { @DELETE @Path("/{name}") @ApiOperation(value = "Delete a ListOfValues", response = Response.class) @ApiResponses(value = { @ApiResponse(code = 204, message = "Successful deletion of ListOfValuesDTO"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response deleteLOV( @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId, @ApiParam(required = true, value = "Name") @PathParam("name") String name) throws EntityNotFoundException, UserNotActiveException, AccessRightException, EntityConstraintException, WorkspaceNotEnabledException { ListOfValuesKey lovKey = new ListOfValuesKey(workspaceId, name); lovManager.deleteLov(lovKey); return Response.noContent().build(); } LOVResource(); @PostConstruct void init(); @GET @ApiOperation(value = "Get a list of ListOfValues for given parameters", response = ListOfValuesDTO.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 200, message = "Successful retrieval of ListOfValuesDTOs. It can be an empty list."), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Produces(MediaType.APPLICATION_JSON) Response getLOVs(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId); @POST @ApiOperation(value = "Create a new ListOfValues", response = ListOfValuesDTO.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Successful retrieval of created ListOfValuesDTO"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response createLOV(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId,
            @ApiParam(required = true, value = "LOV to create") ListOfValuesDTO lovDTO); @GET @ApiOperation(value = "Get a ListOfValues from the given parameters", response = ListOfValuesDTO.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Successful retrieval of ListOfValuesDTOs. It can be an empty list."), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Path("/{name}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) ListOfValuesDTO getLOV(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId,
            @ApiParam(required = true, value = "Name") @PathParam("name") String name); @PUT @Path("/{name}") @ApiOperation(value = "Update a ListOfValues", response = ListOfValuesDTO.class) @ApiResponses(value = { @ApiResponse(code = 201, message = "Successful retrieval of updated ListOfValuesDTO"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) ListOfValuesDTO updateLOV(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId,
            @ApiParam(required = true, value = "Name") @PathParam("name") String name,
            @ApiParam(required = true, value = "LOV to update") ListOfValuesDTO lovDTO); @DELETE @Path("/{name}") @ApiOperation(value = "Delete a ListOfValues", response = Response.class) @ApiResponses(value = { @ApiResponse(code = 204, message = "Successful deletion of ListOfValuesDTO"), @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Forbidden"), @ApiResponse(code = 500, message = "Internal server error") }) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response deleteLOV(
            @ApiParam(required = true, value = "Workspace id") @PathParam("workspaceId") String workspaceId,
            @ApiParam(required = true, value = "Name") @PathParam("name") String name);  }
@Test public void deleteLOVTest() throws ApplicationException { String name = "foo"; ListOfValuesKey lovKey = new ListOfValuesKey(workspaceId, name); Mockito.doNothing().when(lovManager).deleteLov(lovKey); Response response = lovResource.deleteLOV(workspaceId, name); Assert.assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus()); }