SpecOfferWaveController extends BaseController implements
	CrudController<SpecOfferWaveResource, SpecOfferWaveResource> { @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{specOfferId}/waves", method = RequestMethod.POST) @ApiOperation(value = "Create Specoffer Wave", position = 1) public SpecOfferWaveResource createResource( @Valid @RequestBody final SpecOfferWaveResource resource) { LOG.info("Creating spec offer wave: {}", resource); return facade.createResource(resource); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = "/{specOfferId}/waves", method = RequestMethod.POST) @ApiOperation(value = "Create Specoffer Wave", position = 1) SpecOfferWaveResource createResource(
	    @Valid @RequestBody final SpecOfferWaveResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/waves/{specOfferWaveId}", method = RequestMethod.PUT) @ApiOperation(value = "Update SpecOffer Wave", position = 2) MessageResource updateResource(
	    @PathVariable("specOfferWaveId") final Long specOfferWaveId,
	    @RequestBody final SpecOfferWaveResource resource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/waves/{id}", method = RequestMethod.GET) @ApiOperation(value = "Get's SpecOffer Wave", position = 3) SpecOfferWaveResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = "/{specOfferId}/waves/{id}", method = RequestMethod.DELETE) @ApiOperation(value = "Remove Specoffer Wave", position = 4) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/{specOfferId}/waves", method = RequestMethod.GET) @ApiOperation(value = "Get's All SpecOffers Wave", position = 5) PagedResultResource<SpecOfferWaveResource> getPagedResource(
	    final PagedRequest<SpecOfferWaveResource> request);  }
@Test public void testCreateSpecOfferWave() throws Exception { Long specOfferId = 1L; SpecOfferWaveResource specOfferSubjectResource = new SpecOfferWaveResource(); String request = getJson(specOfferSubjectResource, true); String response = getJson(specOfferSubjectResource, false); when(facade.createResource(any(SpecOfferWaveResource.class))) .thenReturn(specOfferSubjectResource); mockMvc.perform( post("/specoffers/{0}/waves", specOfferId).contentType( MediaType.APPLICATION_JSON).content(request)) .andExpect(status().isCreated()) .andExpect(content().string(response)); verify(facade).createResource(specOfferSubjectResource); }