@Test public void testLoadAuthoritiesByUsername() { List<GrantedAuthority> result = sut.loadAuthoritiesByUsername("testUser"); assertNotNull(result); assertEquals("Expected list size of 1.", 1, result.size()); }
public List<GrantedAuthority> loadAuthoritiesByUsername(final String username) { List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(1); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); return authorities; }
AuthorityProviderImpl implements AuthorityProvider { public List<GrantedAuthority> loadAuthoritiesByUsername(final String username) { List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(1); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); return authorities; } }
AuthorityProviderImpl implements AuthorityProvider { public List<GrantedAuthority> loadAuthoritiesByUsername(final String username) { List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(1); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); return authorities; }  }
AuthorityProviderImpl implements AuthorityProvider { public List<GrantedAuthority> loadAuthoritiesByUsername(final String username) { List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(1); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); return authorities; }  List<GrantedAuthority> loadAuthoritiesByUsername(final String username); }
AuthorityProviderImpl implements AuthorityProvider { public List<GrantedAuthority> loadAuthoritiesByUsername(final String username) { List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(1); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); return authorities; }  List<GrantedAuthority> loadAuthoritiesByUsername(final String username);  }