SystemController { @GetMapping("time") public ValueHolder<Instant> time() { return new ValueHolder<>(Instant.now()); }  @GetMapping("time") ValueHolder<Instant> time(); @GetMapping("index") ValueHolder<String> index(); @PutMapping("index") @ResponseStatus(HttpStatus.NO_CONTENT) @Secured("ROLE_ADMIN") void setIndex(@RequestBody ValueHolder<String> form);  }
@Test public void testTime() throws Exception { log.info("time"); MvcResult result = mvc.perform(get("/api/system/time.json")) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)) .andReturn(); }