GlobalPropertyResource { @DELETE @Timed @UnitOfWork @Path("{id}") @ApiOperation(value = "Soft delete") public Response delete(@PathParam("id") final int id) { service.delete(id); return Response.ok().build(); }  @POST @Consumes(MediaType.APPLICATION_JSON) @Timed @UnitOfWork @ApiOperation(value = "Save global property", response = GlobalPropertyDomain.class) Response save(@NotNull @Valid final GlobalPropertyDomain globalProperty); @GET @Timed @UnitOfWork(transactional = false) @Path("{id}") @ApiOperation(value = "Get global property by id", response = GlobalPropertyDomain.class) Response get(@PathParam("id") final int id); @GET @Timed @UnitOfWork(transactional = false) @ApiOperation(value = "Search global property based on name, param", response = Set.class) Response search(@QueryParam("name") final String name, @QueryParam("type") final String propertyType); @DELETE @Timed @UnitOfWork @Path("{id}") @ApiOperation(value = "Soft delete") Response delete(@PathParam("id") final int id);  }
@Test public void testDeleteById() { doNothing().when(service).delete(anyInt()); final Response response = resource.delete(globalProperty.getId()); Assert.assertEquals(response.getStatus(), 200); }