@Test public void testBasics() throws IOException { UserDetails user = userController.authenticate(); Assert.assertNotNull(user); Assert.assertTrue(user.getUsername().equals("ADMIN")); }
@RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") public UserDetails authenticate() { return authenticatedUser(); }
UserController { @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") public UserDetails authenticate() { return authenticatedUser(); } }
UserController { @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") public UserDetails authenticate() { return authenticatedUser(); }  }
UserController { @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") public UserDetails authenticate() { return authenticatedUser(); }  @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") UserDetails authenticate(); @RequestMapping(value = "/authentication", method = RequestMethod.GET, produces = "application/json") UserDetails authenticatedUser(); @RequestMapping(value = "/authentication/authorities", method = RequestMethod.GET, produces = "application/json") List<String> getAuthorities(); }
UserController { @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") public UserDetails authenticate() { return authenticatedUser(); }  @RequestMapping(value = "/authentication", method = RequestMethod.POST, produces = "application/json") UserDetails authenticate(); @RequestMapping(value = "/authentication", method = RequestMethod.GET, produces = "application/json") UserDetails authenticatedUser(); @RequestMapping(value = "/authentication/authorities", method = RequestMethod.GET, produces = "application/json") List<String> getAuthorities();  }