for ( String extraRole : extraRoles ) {
authorities[i++] = new GrantedAuthorityImpl( extraRole );
}
// use the mapper to create a UserDetails instance
UserDetails userDetails = mapper.mapUserFromContext( ctx, "suzy", authorities ); //$NON-NLS-1$
System.out.println( userDetails );
// this asserts the ordering too; not strictly necessary
GrantedAuthority[] expected =
new GrantedAuthority[] { new GrantedAuthorityImpl( "A" ), new GrantedAuthorityImpl( "cto" ), //$NON-NLS-1$ //$NON-NLS-2$