ProblemController { @GetMapping("{id}/dataDir") public Map<String, String> dataDir(@PathVariable("id") long id) throws IOException { String dataDir = problemService.getDataDirectory(id).toString(); return ImmutableMap.of("dataDir", dataDir); }  @PostMapping Problem save(@RequestBody Problem problem); @DeleteMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) void delete(@PathVariable("id") long id); @GetMapping("{id}/dataDir") Map<String, String> dataDir(@PathVariable("id") long id); @GetMapping("{id}") Problem findOne(@PathVariable("id") long id,
            @RequestParam(value = "locale", required = false) @Nullable String lang); @GetMapping Page<Problem> list(ProblemForm problemForm, @PageableDefault(100) Pageable pageable, Locale locale); @PatchMapping("{id}") @ResponseStatus(HttpStatus.NO_CONTENT) void update(@PathVariable("id") long problemId, @RequestBody Problem p,
            @RequestParam(value = "locale", required = false) @Nullable String requestLocale); @GetMapping("{id}/attachment") List<String> attachment(@PathVariable("id") long problemId,
            @RequestParam(value = "locale", required = false) @Nullable String requestLocale);  }
@Test public void testDataDir() throws Exception { log.info("dataDir"); Problem problem = mockDataService.problem(); MvcResult result = mvc.perform(get("/api/problems/{id}/dataDir", problem.getId()).accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andReturn(); objectMapper.readTree(result.getResponse().getContentAsString()).hasNonNull("dataDir"); }