LanguageController { @DeleteMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) public void delete(@PathVariable("id") long id) { languageMapper.deleteById(id); }  @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 testDelete() throws Exception { log.info("delete"); long id = anyId(); MvcResult result = mvc.perform(delete("/api/languages/{id}.json", id)) .andExpect(status().isNoContent()) .andReturn(); }