### Question:
FooController { @PutMapping("/{id}") public HttpEntity<FooResource> update(@PathVariable UUID id, @RequestBody FooResource fooResource) { log.info("Update {} : {}", id, fooResource); Foo entity = new Foo(fooResource.getUuid(), fooResource.getName()); return ResponseEntity.ok(assembler.toModel(entity)); } FooController(EntityLinks entityLinks); @GetMapping("/{id}") FooResource get(@PathVariable UUID id); @PutMapping("/{id}") HttpEntity<FooResource> update(@PathVariable UUID id, @RequestBody FooResource fooResource); @PostMapping HttpEntity<FooResource> create(@RequestBody FooResource fooResource);  }### Answer:
@Test public void update() throws Exception { mockMvc.perform(put("/foos/{id}", "foo") .content("{\"uuid\":\"foo\",\"name\":\"Sample Foo\"}") .contentType("application/hal+json;charset=UTF-8")) .andDo(print()) .andExpect(status().isOk()); }