/**
* Serialize an instance, restore it, and check for equality.
*/
public void testSerialization() {
final BooleanList l1 = new BooleanList();
l1.setBoolean(0, Boolean.TRUE);
l1.setBoolean(1, Boolean.FALSE);
l1.setBoolean(2, null);
BooleanList l2 = null;
try {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(l1);