MiscController { @GetMapping("systemInfo") public SystemInfoForm systemInfo() { SystemInfoForm systemInfo = systemService.getSystemInfo(); if (systemInfo == null) { systemInfo = new SystemInfoForm(); systemInfo.setPureText(true); return systemInfo; } if (!StringUtils.hasText(systemInfo.getInfo())) { systemInfo.setPureText(true); } return systemInfo; }  @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 testSystemInfo() throws Exception { log.info("systemInfo"); MvcResult result = mvc.perform(get("/api/misc/systemInfo.json")) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)) .andReturn(); }