@Test
public void testSimplePropertiesUnlocked() throws Exception
{
AvlPartition avlPartition = new AvlPartition( schemaManager );
avlPartition.setSyncOnWrite( true ); // for code coverage
assertNull( avlPartition.getAliasIndex() );
avlPartition.addIndex( new AvlIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) );
assertNotNull( avlPartition.getAliasIndex() );
assertEquals( 0, avlPartition.getCacheSize() );
assertNull( avlPartition.getPresenceIndex() );
avlPartition.addIndex( new AvlIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID ) );
assertNotNull( avlPartition.getPresenceIndex() );
assertNull( avlPartition.getOneLevelIndex() );
avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) );
assertNotNull( avlPartition.getOneLevelIndex() );
assertNull( avlPartition.getSubLevelIndex() );
avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID ) );
assertNotNull( avlPartition.getSubLevelIndex() );
assertNull( avlPartition.getId() );
avlPartition.setId( "foo" );
assertEquals( "foo", avlPartition.getId() );
assertNull( avlPartition.getRdnIndex() );
avlPartition.addIndex( new AvlRdnIndex( ApacheSchemaConstants.APACHE_RDN_AT_OID ) );
assertNotNull( avlPartition.getRdnIndex() );
assertNull( avlPartition.getOneAliasIndex() );
avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) );
assertNotNull( avlPartition.getOneAliasIndex() );
assertNull( avlPartition.getSubAliasIndex() );
avlPartition.addIndex( new AvlIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) );
assertNotNull( avlPartition.getSubAliasIndex() );
assertNull( avlPartition.getSuffixDn() );
avlPartition.setSuffixDn( EXAMPLE_COM );
assertEquals( "dc=example,dc=com", avlPartition.getSuffixDn().getName() );
assertNotNull( avlPartition.getSuffixDn() );
assertFalse( avlPartition.getUserIndices().hasNext() );
avlPartition.addIndex( new AvlIndex<Object, Entry>( "2.5.4.3" ) );
assertTrue( avlPartition.getUserIndices().hasNext() );
assertNull( avlPartition.getPartitionPath() );
avlPartition.setPartitionPath( new File( "." ).toURI() );
assertNull( avlPartition.getPartitionPath() );
assertFalse( avlPartition.isInitialized() );
assertFalse( avlPartition.isSyncOnWrite() );
avlPartition.setSyncOnWrite( false );
assertFalse( avlPartition.isSyncOnWrite() );
avlPartition.sync();
avlPartition.destroy();
}