// Check the decoded message
assertEquals( 1, addRequest.getMessageId() );
assertEquals( "cn=testModify,ou=users,ou=system", addRequest.getEntryDn().toString() );
Entry entry = addRequest.getEntry();
assertEquals( 2, entry.size() );
Set<String> expectedTypes = new HashSet<String>();
expectedTypes.add( "l" );
expectedTypes.add( "attrs" );
Map<String, Set<String>> typesVals = new HashMap<String, Set<String>>();
Set<String> lVal1 = new HashSet<String>();
lVal1.add( "Paris" );
typesVals.put( "l", lVal1 );
Set<String> lVal2 = new HashSet<String>();
lVal2.add( "test1" );
lVal2.add( "test2" );
lVal2.add( "test3" );
typesVals.put( "attrs", lVal2 );
Attribute attribute = entry.get( "l" );
assertTrue( expectedTypes.contains( Strings.toLowerCase( attribute.getId() ) ) );
Set<String> vals = ( Set<String> ) typesVals.get( Strings.toLowerCase( attribute.getId() ) );
for ( Value<?> value : attribute )
{
assertTrue( vals.contains( value.getValue() ) );
vals.remove( value.getValue() );
}
attribute = entry.get( "attrs" );
assertTrue( expectedTypes.contains( Strings.toLowerCase( attribute.getId() ) ) );
vals = ( Set<String> ) typesVals.get( Strings.toLowerCase( attribute.getId() ) );