assertEquals( 4, searchRequest.getMessageId() );
assertEquals( 2, searchRequest.getControls().size() );
// this is a constant in Java 5 API
String pagedResultsControlOID = "1.2.840.113556.1.4.319";
Control pagedResultsControl = searchRequest.getControl( pagedResultsControlOID );
assertEquals( pagedResultsControlOID, pagedResultsControl.getOid() );
assertTrue( pagedResultsControl.isCritical() );
// this is a constant in Java 5 API
String manageReferralControlOID = "2.16.840.1.113730.3.4.2";
Control manageReferralControl = searchRequest.getControl( manageReferralControlOID );
assertEquals( manageReferralControlOID, manageReferralControl.getOid() );
assertEquals( "dc=my-domain,dc=com", searchRequest.getBase().toString() );
assertEquals( SearchScope.SUBTREE, searchRequest.getScope() );
assertEquals( AliasDerefMode.DEREF_ALWAYS, searchRequest.getDerefAliases() );
assertEquals( 0, searchRequest.getSizeLimit() );