NoOpLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator { public Collection<? extends GrantedAuthority> getGrantedAuthorities( DirContextOperations userDetails, String username ) { return new ArrayList<GrantedAuthority>(); }  Collection<? extends GrantedAuthority> getGrantedAuthorities( DirContextOperations userDetails, String username );  }
@Test public void testGetGrantedAuthorities() throws Exception { NoOpLdapAuthoritiesPopulator noop = new NoOpLdapAuthoritiesPopulator(); Collection<? extends GrantedAuthority> grantedAuthorities = noop.getGrantedAuthorities( null, null ); assertNotNull( grantedAuthorities ); assertEquals( 0, grantedAuthorities.size() ); }