### Question:
ConfigController { @RequestMapping(path = "/{key:.+}", method = PUT) public void setKey( HttpServletRequest request, HttpServletResponse response, @PathVariable String key, @RequestBody(required = false) String value ) throws IOException { SessionEntry session = authFilter.handle(request, response); if (session == null) { return; } configService.setKey(session.getUser(), key, value); } @Autowired  ConfigController(ConfigService configService, AuthFilter authFilter); @GetMapping Configuration get(HttpServletRequest request, HttpServletResponse response); @RequestMapping(path = "/{key:.+}", method = PUT) void setKey(
		HttpServletRequest request,
		HttpServletResponse response,
		@PathVariable String key,
		@RequestBody(required = false) String value
	); @RequestMapping(path = "/{key:.+}", method = DELETE) void unsetKey(
		HttpServletRequest request,
		HttpServletResponse response,
		@PathVariable String key
	);  }### Answer:
@Test public void testSetKey() throws Exception { mockMvc.perform(put("/config/key") .content("value") .contentType(MediaType.TEXT_PLAIN)) .andExpect(status().isOk()); verify(configService).setKey(anyInt(), eq("key"), eq("value")); }