AssetController extends BaseController implements CrudController<AssetResource, AssetResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) @ApiOperation(value = "Delete Asset by id") public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing Admin Unit with id: {}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "Asset removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(method = RequestMethod.POST) @ApiOperation(value = "Create Asset") AssetResource createResource(@Valid @RequestBody final AssetResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.PUT) @ApiOperation(value = "Update Asset") MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final AssetResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.GET) @ApiOperation(value = "Get Asset by id") AssetResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) @ApiOperation(value = "Delete Asset by id") MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.GET) @ApiOperation(value = "Get Assets") PagedResultResource<AssetResource> getPagedResource(final PagedRequest<AssetResource> request);  }
@Test public void testDeleteAsset() throws Exception { Long id = 1L; mockMvc.perform(delete("/assets/{id}", id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }