LanguageController { @PutMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) public void update(@PathVariable("id") long id, @RequestBody Language language) { languageMapper.update(id, language); }  @GetMapping List<Language> findAll(); @PostMapping @ResponseStatus(HttpStatus.NO_CONTENT) void save(@RequestBody Language language); @GetMapping("{id}") Language findOne(@PathVariable("id") long id); @PutMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) void update(@PathVariable("id") long id, @RequestBody Language language); @DeleteMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) void delete(@PathVariable("id") long id);  }
@Test public void testUpdate() throws Exception { log.info("update"); long id = anyId(); Language request = Language.builder() .name("mock language") .sourceExtension("tmp") .executableExtension("dummy") .build(); MvcResult result = mvc.perform(put("/api/languages/{id}.json", id) .content(objectMapper.writeValueAsString(request)).contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNoContent()) .andReturn(); }