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