AppLogController { @ResponseBody @RequestMapping(value = "/logs", method = {RequestMethod.GET, RequestMethod.POST}) public Map<String, Collection<String>> getLogFiles() { Map<String, Collection<String>> jsonResponse = new HashMap<>(); jsonResponse.put(JSON_NAME, logFileProvider.getLogFileNames()); return jsonResponse; }  @RequestMapping(value = "/applog", method = RequestMethod.GET) String applog(); @ResponseBody @RequestMapping(value = "/logs", method = {RequestMethod.GET, RequestMethod.POST}) Map<String, Collection<String>> getLogFiles(); @RequestMapping(value = "/logs/{fileName:.+}", method = {RequestMethod.GET, RequestMethod.POST}) ResponseEntity<String> getLogFileContent(@PathVariable("fileName") final String fileName,
            @RequestParam(value = "source", defaultValue = "false") final boolean source,
            @RequestHeader(value = "User-Agent", defaultValue = "") final String userAgent);  }
@Test public void testGetLogFilesShouldRespondWithLogFilesWithJsonName() { Map<String, Collection<String>> expected = new HashMap<>(); Collection<String> fileNames = new ArrayList<>(); fileNames.add("a"); expected.put(JSON_NAME, fileNames); given(logFileProvider.getLogFileNames()).willReturn(fileNames); Map<String, Collection<String>> result = underTest.getLogFiles(); assertEquals(expected, result); }