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