* Test the serialization of an empty LdapPrincipal
*/
@Test
public void testStaticSerializeEmptyLdapPrincipal() throws Exception
{
LdapPrincipal principal = new LdapPrincipal();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream( baos );
out.writeObject( principal );
byte[] data = baos.toByteArray();
ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( data ) );
LdapPrincipal readPrincipal = (LdapPrincipal)in.readObject();
assertEquals( principal.getAuthenticationLevel(), readPrincipal.getAuthenticationLevel() );
assertEquals( principal.getName(), readPrincipal.getName() );
}