{
Collection<String> attrTypes = new ArrayList<String>();
attrTypes.add( "cn" );
Collection<ACITuple> tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
ServerEntry entry = new DefaultServerEntry( schemaManager, USER_NAME );
entry.put( "cn", USER_NAME.getNormName() );
// Test wrong scope
assertEquals( 0, filterA.filter( null, tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
"cn", null, entry, null, null ).size() );
tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
assertEquals( 1, filterA.filter( null, tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
null, null, null, "cn", null, entry, null, null ).size() );
entry.removeAttributes( "cn" );
assertEquals( 0, filterA.filter( null, tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
null, null, null, "cn", null, entry, null, null ).size() );
tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
assertEquals( 0, filterA.filter( null, tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,