// try jpegPhoto which should be binary automatically - use ou as control
byte[] keyValue = new byte[]
{ (byte)0xFF, (byte)0xD8, (byte)0xFF, (byte)0xE0, 0x01, 0x02, 'J', 'F', 'I', 'F', 0x00, 0x45, 0x23, 0x7d, 0x7f };
attributes.put( "jpegPhoto", keyValue );
sysRoot.createSubcontext( "ou=anothertest", attributes );
ctx = ( DirContext ) sysRoot.lookup( "ou=anothertest" );
ou = ctx.getAttributes( "" ).get( "ou" );
value = ou.get();
assertEquals( "anothertest", value );
Attribute jpegPhoto = ctx.getAttributes( "" ).get( "jpegPhoto" );
value = jpegPhoto.get();