@Test
public void testComplexAndRefinement() throws Exception
{
ExprNode refinement = null;
EntryAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
objectClasses.add( "organizationalUnit" );
String refStr = "(&(objectClass=person)(objectClass=organizationalUnit))";
refinement = FilterParser.parse( refStr );
assertTrue( evaluator.evaluate( refinement, objectClasses ) );
objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "organizationalUnit" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "domain" );
assertFalse( evaluator.evaluate( refinement, objectClasses ) );
}