AssetAddressController extends BaseController implements CrudController<AssetAddressResource, AssetAddressResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{assetId}/addresses/{id}", method = RequestMethod.DELETE) public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing asset address with id: {}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "AssetAddress removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{assetId}/addresses", method = RequestMethod.POST) AssetAddressResource createResource(@Valid @RequestBody final AssetAddressResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{assetId}/addresses/{id}", method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final AssetAddressResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{assetId}/addresses/{id}", method = RequestMethod.GET) AssetAddressResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{assetId}/addresses/{id}", method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{assetId}/addresses", method = RequestMethod.GET) PagedResultResource<AssetAddressResource> getPagedResource(final PagedRequest<AssetAddressResource> request);  }
@Test public void testDeleteAssetAddress() throws Exception { Long id = 1L; mockMvc.perform(delete("/assets/1/addresses/{id}", id)) .andExpect(status().is(204)); verify(facade).removeResource(id); }