fail( de.getMessage() );
}
assertEquals( TLVStateEnum.PDU_DECODED, ldapMessageContainer.getState() );
SearchRequest searchRequest = ldapMessageContainer.getMessage();
assertEquals( 33, searchRequest.getMessageId() );
assertEquals( "dc=example,dc=com", searchRequest.getBase().toString() );
assertEquals( SearchScope.OBJECT, searchRequest.getScope() );
assertEquals( AliasDerefMode.DEREF_FINDING_BASE_OBJ, searchRequest.getDerefAliases() );
assertEquals( 2, searchRequest.getSizeLimit() );
assertEquals( 3, searchRequest.getTimeLimit() );
assertEquals( true, searchRequest.getTypesOnly() );
// (objectclass=t*)
OrNode orNode = ( OrNode ) searchRequest.getFilter();
assertNotNull( orNode );
assertEquals( 5, orNode.getChildren().size() );
// uid=akarasulu
EqualityNode<?> equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 0 );
assertEquals( "uid", equalityNode.getAttribute() );
assertEquals( "akarasulu", equalityNode.getValue().getString() );
// cn=aok
equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 1 );
assertEquals( "cn", equalityNode.getAttribute() );
assertEquals( "aok", equalityNode.getValue().getString() );
// ou = Human Resources
equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 2 );
assertEquals( "ou", equalityNode.getAttribute() );
assertEquals( "Human Resources", equalityNode.getValue().getString() );
// l=Santa Clara
equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 3 );
assertEquals( "l", equalityNode.getAttribute() );
assertEquals( "Santa Clara", equalityNode.getValue().getString() );
// cn=abok
equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 4 );
assertEquals( "cn", equalityNode.getAttribute() );
assertEquals( "abok", equalityNode.getValue().getString() );
// The attributes
List<String> attributes = searchRequest.getAttributes();
for ( String attribute : attributes )
{
assertNotNull( attribute );
}