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