LanguageController { @PostMapping @ResponseStatus(HttpStatus.NO_CONTENT) public void save(@RequestBody Language language) { languageMapper.save(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 testSave() throws Exception { log.info("save"); Language language = Language.builder() .name("mock language") .sourceExtension("tmp") .executableExtension("dummy") .description("test description") .build(); MvcResult result = mvc.perform(post("/api/languages.json") .content(objectMapper.writeValueAsString(language)).contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNoContent()) .andReturn(); }