@Test
public void testLookupPlus() throws Exception
{
service.setDenormalizeOpAttrsEnabled( true );
DN dn = new DN( "cn=test,ou=system" );
Entry entry = service.getAdminSession().lookup( dn, new String[]{ "+" } );
assertNotNull( entry );
// We should have 5 attributes
assertEquals( 7, entry.size() );
// Check that all the user attributes are present
assertEquals( "test", entry.get( "cn" ).getString() );
assertEquals( "sn_test", entry.get( "sn" ).getString() );
assertTrue( entry.contains( "objectClass", "top", "person" ) );
// Check that we have all the operational attributes :
// We should have 3 users attributes : objectClass, cn and sn
// and 2 operational attributes : createTime and createUser
assertNotNull( entry.get( "createTimestamp" ).getString() );
assertEquals( "uid=admin,ou=system", entry.get( "creatorsName" ).getString() );
}