public void testBinaryAtavStaticSerialization() throws LdapException, IOException, ClassNotFoundException
{
byte[] upValue = Strings.getBytesUtf8(" Test ");
byte[] normValue = Strings.getBytesUtf8("Test");
Ava atav = new Ava( "cn", "CN", upValue, normValue );
atav.normalize();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream( baos );
AvaSerializer.serialize(atav, out);
out.flush();
ObjectInputStream in = null;
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
Ava atav2 = AvaSerializer.deserialize(in);
assertEquals( atav, atav2 );
}