@Test public void testGetSettings() { when(settingsFacade.getProperty(TASK_POSSIBLE_ERRORS_KEY)).thenReturn(TASK_POSSIBLE_ERRORS_VALUE); SettingsDto dto = controller.getSettings(); verify(settingsFacade, times(1)).getProperty(anyString()); assertEquals(TASK_POSSIBLE_ERRORS_VALUE, dto.getTaskPossibleErrors()); }
@RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody public SettingsDto getSettings() { SettingsDto dto = new SettingsDto(); dto.getProperties(dto, settingsFacade); return dto; }
SettingsController { @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody public SettingsDto getSettings() { SettingsDto dto = new SettingsDto(); dto.getProperties(dto, settingsFacade); return dto; } }
SettingsController { @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody public SettingsDto getSettings() { SettingsDto dto = new SettingsDto(); dto.getProperties(dto, settingsFacade); return dto; }  }
SettingsController { @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody public SettingsDto getSettings() { SettingsDto dto = new SettingsDto(); dto.getProperties(dto, settingsFacade); return dto; }  @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody SettingsDto getSettings(); @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/settings", method = RequestMethod.POST) void saveSettings(@RequestBody SettingsDto settings); }
SettingsController { @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody public SettingsDto getSettings() { SettingsDto dto = new SettingsDto(); dto.getProperties(dto, settingsFacade); return dto; }  @RequestMapping(value = "/settings", method = RequestMethod.GET) @ResponseBody SettingsDto getSettings(); @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/settings", method = RequestMethod.POST) void saveSettings(@RequestBody SettingsDto settings);  }