### Question:
ColumnLabels extends Observable implements Serializable { public ObservableList<ColumnLabel> getColumnsInLabel() { return myColumnsInLabel; }  ObservableList<ColumnLabel> getColumnsInLabel(); boolean isAlwaysShowLabels(); void setAlwaysShowLabels(boolean alwaysShowLabels); void copyFrom(ColumnLabels other); @Override int hashCode(); @Override boolean equals(Object obj); static final String ALWAYS_SHOW_LABELS_PROP; }### Answer:
@Test public void testSerializeEmpty() throws IOException, ClassNotFoundException { EasyMockSupport support = new EasyMockSupport(); @SuppressWarnings("unchecked") ListDataListener<ColumnLabel> listener = support.createMock(ListDataListener.class); support.replayAll(); ColumnLabels model = new ColumnLabels(); ByteArrayOutputStream out = new ByteArrayOutputStream(); ObjectOutputStream objectOut = new ObjectOutputStream(out); objectOut.writeObject(model); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); ObjectInputStream objectIn = new ObjectInputStream(in); ColumnLabels actual = (ColumnLabels)objectIn.readObject(); actual.getColumnsInLabel().addChangeListener(listener); support.verifyAll(); }