### Question:
AclImpl implements Acl, Serializable { @Override public String toString() { final StringBuilder sb = new StringBuilder(); for( final AclEntry entry : m_entries ) { final Principal pal = entry.getPrincipal(); if( pal != null ) { sb.append( " user = " ).append( pal.getName() ).append( ": " ); } else { sb.append( " user = null: " ); } sb.append( "(" ); for( final Enumeration< Permission > perms = entry.permissions(); perms.hasMoreElements(); ) { final Permission perm = perms.nextElement(); sb.append( perm.toString() ); } sb.append( ")\n" ); } return sb.toString(); } AclImpl(); @Override Principal[] findPrincipals( final Permission permission ); @Override synchronized boolean addEntry( final AclEntry entry ); @Override synchronized boolean removeEntry( final AclEntry entry ); @Override Enumeration< AclEntry > aclEntries(); @Override AclEntry getAclEntry( final Principal principal ); @Override boolean isEmpty(); @Override String toString();  }### Answer:
@Test public void testSerialization() throws IOException, ClassNotFoundException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); final ObjectOutputStream out2 = new ObjectOutputStream(out); out2.writeObject( m_acl ); out2.close(); final byte[] stuff = out.toByteArray(); final ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(stuff) ); final AclImpl newacl = (AclImpl) in.readObject(); Assertions.assertEquals( newacl.toString(), m_acl.toString() ); }