try
{
Dn base = new Dn( "dc=example,dc=com" );
SearchScope scope = SearchScope.SUBTREE;
ExprNode exprNode = FilterParser.parse( getService().getSchemaManager(), "(objectClass=*)" );
AliasDerefMode aliasDerefMode = AliasDerefMode.DEREF_ALWAYS;
EntryFilteringCursor cursor = getService().getAdminSession()
.search( base, scope, exprNode, aliasDerefMode, null );
// advancing the cursor forward and backward must give the same result
for ( int count = 1; count < 20; count++ )