}
@Test
public void traverseAPIIterating() {
int cycles = 0;
for (OIdentifiable id : new OTraverse().target(database.browseClass("Movie").iterator()).predicate(new OCommandPredicate() {
@Override
public Object evaluate(ORecord iRecord, ODocument iCurrentResult, OCommandContext iContext) {
return ((Integer) iContext.getVariable("depth")) <= 2;
}
})) {