MarkScaleExchangeController extends BaseController implements CrudController<MarkScaleExchangeResource, MarkScaleExchangeResource> { @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{markScaleId}/exchanges/{id}", method = RequestMethod.DELETE) @ApiOperation(value = "Delete MarkScale Exchange", position = 4) public MessageResource removeResource(@PathVariable("id") final Long id) { LOG.info("Removing markScale exchange with id: {}", id); facade.removeResource(id); return new MessageResource(MessageType.INFO, "MarkScale Exchange removed"); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{markScaleId}/exchanges", method = RequestMethod.POST) @ApiOperation(value = "Create MarkScale Exchange", position = 1) MarkScaleExchangeResource createResource(@Valid @RequestBody final MarkScaleExchangeResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{markScaleId}/exchanges/{id}", method = RequestMethod.PUT) @ApiOperation(value = "Update MarkScale Exchange", position = 2) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final MarkScaleExchangeResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{markScaleId}/exchanges/{id}", method = RequestMethod.GET) @ApiOperation(value = "Get MarkScale Exchange by id", position = 3) MarkScaleExchangeResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{markScaleId}/exchanges/{id}", method = RequestMethod.DELETE) @ApiOperation(value = "Delete MarkScale Exchange", position = 4) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{markScaleId}/exchanges", method = RequestMethod.GET) @ApiOperation(value = "Get MarkScales Exchanges", position = 5) PagedResultResource<MarkScaleExchangeResource> getPagedResource(final PagedRequest<MarkScaleExchangeResource> request);  }
@Test public void testDeleteDepatmentExchange() throws Exception { Long personId = 2L; Long contactId = 1L; mockMvc.perform(delete("/marks/scales/{markScaleId}/exchanges/{contactId}", personId, contactId)) .andExpect(status().is(204)); verify(facade).removeResource(contactId); }