@Test
public void testGetRecordsAllWithComplexFilter()
                        throws Exception {

    StoredISORecords storedIsoRecords = getStoredIsoRecords();
    Literal<PrimitiveValue> literalSubject = new Literal<PrimitiveValue>( "SPOT 2" );
    Operator operatorSubject = new PropertyIsEqualTo( new ValueReference( "Subject", nsContext ), literalSubject,
                                                      true, null );
    Literal<PrimitiveValue> lowerCreation = new Literal<PrimitiveValue>( "2006-06-14" );
    Literal<PrimitiveValue> upperCreation = new Literal<PrimitiveValue>( "2006-06-16" );
    Operator operatorCreation = new PropertyIsBetween( new ValueReference( "apiso:CreationDate", nsContext ),
                                                       lowerCreation, upperCreation, true, null );
    Operator or = new Or( operatorSubject, operatorCreation );
    Filter filter = new OperatorFilter( or );
    MetadataQuery query = new MetadataQuery( null, null, filter, null, 1, 100 );
    MetadataResultSet<ISORecord> allRecords = storedIsoRecords.getRecords( query );
    assertEquals( 4, allRecords.getRemaining() );
}