MiscController { @PostMapping("fix") @ResponseStatus(HttpStatus.NO_CONTENT) public CompletableFuture<?> fix() { return CompletableFuture.runAsync(userProblemMapper::init).thenComposeAsync(__ -> { CompletableFuture<?> b = CompletableFuture.runAsync(userProblemMapper::updateProblems); CompletableFuture<?> c = CompletableFuture.runAsync(userProblemMapper::updateUsers); return CompletableFuture.allOf(b, c); }); }  @PostMapping("fix") @ResponseStatus(HttpStatus.NO_CONTENT) CompletableFuture<?> fix(); @PutMapping("systemInfo") @ResponseStatus(HttpStatus.NO_CONTENT) void setSystemInfo(@RequestBody SystemInfoForm json); @GetMapping("systemInfo") SystemInfoForm systemInfo(); @GetMapping("contestOnly") ValueHolder<Long> contestOnly(); @PutMapping("contestOnly") @ResponseStatus(HttpStatus.NO_CONTENT) void setContestOnly(@RequestBody ValueHolder<Long> form);  }
@Test public void testFix() throws Exception { log.info("fix"); MvcResult result = mvc.perform(post("/api/misc/fix.json")) .andExpect(status().isNoContent()) .andReturn(); }