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