ITenant defaultTenant = new Tenant( "/pentaho/tenant0", true );
login( "suzy", defaultTenant );
LdapUserSearch userSearch = getUserSearch( "ou=users", "(uid={0})" ); //$NON-NLS-1$//$NON-NLS-2$
LdapUserDetailsService service = new LdapUserDetailsService( userSearch, new NoOpLdapAuthoritiesPopulator() );
RolePreprocessingMapper mapper = new RolePreprocessingMapper();
mapper.setRoleAttributes( new String[] { "uniqueMember" } ); //$NON-NLS-1$
mapper.setTokenName( "cn" ); //$NON-NLS-1$
service.setUserDetailsMapper( mapper );
DefaultLdapUserRoleListService userRoleListService = new DefaultLdapUserRoleListService();
userRoleListService.setUserDetailsService( service );