### Question:
FooController { @GetMapping("/{id}") public HttpEntity<FooResource> get(@PathVariable UUID id) { log.info("Get {}", id); Foo foo = new Foo(id, "Foo"); FooResource fooResource = assembler.toModel(foo); return ResponseEntity.ok(fooResource); } FooController(FooResourceAssembler assembler); @GetMapping("/{id}") HttpEntity<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 shouldGet() throws Exception { mockMvc.perform(get("/foos/{id}", "cafe")) .andDo(print()) .andExpect(status().isOk()) .andExpect(content().contentType("application/hal+json")) .andExpect(jsonPath("$.uuid", is("cafe"))) .andExpect(jsonPath("$._links.self.href", is("http: }