PublicActivityController extends BaseController implements CrudController<PublicActivityResource, PublicActivityResource> { @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.PUT) public MessageResource updateResource(@PathVariable("id") final Long id, @Valid @RequestBody final PublicActivityResource personResource) { LOG.info("Updating PublicActivity with id: {}, {}", id, personResource); facade.updateResource(id, personResource); return new MessageResource(MessageType.INFO); }  @Override @ResponseStatus(HttpStatus.CREATED) @RequestMapping(method = RequestMethod.POST) PublicActivityResource createResource(@Valid @RequestBody final PublicActivityResource personResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.PUT) MessageResource updateResource(@PathVariable("id") final Long id,
			@Valid @RequestBody final PublicActivityResource personResource); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(value = Request.ID, method = RequestMethod.GET) PublicActivityResource getResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = Request.ID, method = RequestMethod.DELETE) MessageResource removeResource(@PathVariable("id") final Long id); @Override @ResponseStatus(HttpStatus.OK) @RequestMapping(method = RequestMethod.GET) PagedResultResource<PublicActivityResource> getPagedResource(final PagedRequest<PublicActivityResource> request); @Resource(name = "publicActivityFacade")
	private Facade<PublicActivityResource, PublicActivityResource, Long> facade; }
@Test public void testUpdatePublicActivity() throws Exception { Long id = 1L; PublicActivityResource personResource = new PublicActivityResource(); personResource.setId(id); personResource.setBegDate(new Date()); MessageResource responseResource = new MessageResource(MessageType.INFO); String request = getJson(personResource, true); String response = getJson(responseResource, false); mockMvc.perform(put("/publicactivities/{id}", id) .contentType(MediaType.APPLICATION_JSON) .content(request)) .andExpect(status().isOk()) .andExpect(content().string(response)); verify(facade).updateResource(id, personResource); }