@Test
public void testWithMinMaxAndChopBefore() throws Exception
{
SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
Set<DN> chopBefore = new HashSet<DN>();
chopBefore.add( new DN( "uid=Tori Amos" ) );
chopBefore.add( new DN( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
modifier.setChopBeforeExclusions( chopBefore );
modifier.setMinBaseDistance( 1 );
modifier.setMaxBaseDistance( 3 );
modifier.setBase( new DN( "ou=users" ) );
SubtreeSpecification ss = modifier.getSubtreeSpecification();
DN apDn = new DN( "ou=system" );
DN entryDn = new DN( "ou=users,ou=system" );
ServerEntry entry = new DefaultServerEntry( schemaManager, entryDn, "objectClass" );
assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );