@Test
public void testBinaryAtavStaticSerialization() throws LdapException, IOException, ClassNotFoundException
{
byte[] upValue = Strings.getBytesUtf8(" Test ");
Ava atav = new Ava( schemaManager, "userPKCS12", upValue );
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(schemaManager, in );
assertEquals( atav, atav2 );
}