public void testSerialization() {
        FlowArrangement f1 = new FlowArrangement(
            HorizontalAlignment.LEFT, VerticalAlignment.TOP, 1.0, 2.0
        );
        FlowArrangement f2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(f1);
            out.close();

            ObjectInput in = new ObjectInputStream(
                new ByteArrayInputStream(buffer.toByteArray())
            );
            f2 = (FlowArrangement) in.readObject();
            in.close();
        }
        catch (Exception e) {
            System.out.println(e.toString());
        }
        assertEquals(f1, f2);