@WithMockUser(value = "Cookie") @Test public void available() throws Exception { MvcResult result = this.mvc.perform(get("/available") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(status().isOk()) .andReturn(); assertThat(Arrays.asList("Melchior", "Gaspar", "Balthazar")).contains(result.getResponse().getContentAsString()); }
@RequestMapping("/available") public String available() { List<String> guides = Arrays.asList("Melchior", "Gaspar", "Balthazar"); return guides.get(RandomUtils.nextInt(guides.size())); }
CompanyController { @RequestMapping("/available") public String available() { List<String> guides = Arrays.asList("Melchior", "Gaspar", "Balthazar"); return guides.get(RandomUtils.nextInt(guides.size())); } }
CompanyController { @RequestMapping("/available") public String available() { List<String> guides = Arrays.asList("Melchior", "Gaspar", "Balthazar"); return guides.get(RandomUtils.nextInt(guides.size())); }  }
CompanyController { @RequestMapping("/available") public String available() { List<String> guides = Arrays.asList("Melchior", "Gaspar", "Balthazar"); return guides.get(RandomUtils.nextInt(guides.size())); }  @RequestMapping("/available") String available(); }
CompanyController { @RequestMapping("/available") public String available() { List<String> guides = Arrays.asList("Melchior", "Gaspar", "Balthazar"); return guides.get(RandomUtils.nextInt(guides.size())); }  @RequestMapping("/available") String available();  }