putPerson("Max", 6);
putPerson("Pax", 8);
_master.commit();
VCollection persons = _master.getCollection("persons");
VCursor cursor = persons.find();
DBCursor dbcursor = extractDBCursor(cursor);
assertEquals(2, cursor.size());
assertTrue(hasAttachedFilter(cursor));
assertEquals(2, dbcursor.size());
putPerson("Elvis", 3);
_master.commit();
persons = _master.getCollection("persons");
cursor = persons.find();
dbcursor = extractDBCursor(cursor);
assertEquals(3, cursor.size());
assertTrue(hasAttachedFilter(cursor));
assertEquals(3, dbcursor.size());
persons.delete(_factory.createDocument("name", "Max"));
_master.commit();
persons = _master.getCollection("persons");
cursor = persons.find();
dbcursor = extractDBCursor(cursor);
assertEquals(2, cursor.size());
assertTrue(hasAttachedFilter(cursor));
assertEquals(2, dbcursor.size());
}