### Question:
DefaultKeyedValues2D implements KeyedValues2D, PublicCloneable,
        Cloneable, Serializable { public void addValue(Number value, Comparable rowKey, Comparable columnKey) { setValue(value, rowKey, columnKey); } DefaultKeyedValues2D();  DefaultKeyedValues2D(boolean sortRowKeys); @Override int getRowCount(); @Override int getColumnCount(); @Override Number getValue(int row, int column); @Override Comparable getRowKey(int row); @Override int getRowIndex(Comparable key); @Override List<Comparable> getRowKeys(); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable key); @Override List<Comparable> getColumnKeys(); @Override Number getValue(Comparable rowKey, Comparable columnKey); void addValue(Number value, Comparable rowKey,
                         Comparable columnKey); void setValue(Number value, Comparable rowKey,
                         Comparable columnKey); void removeValue(Comparable rowKey, Comparable columnKey); void removeRow(int rowIndex); void removeRow(Comparable rowKey); void removeColumn(int columnIndex); void removeColumn(Comparable columnKey); void clear(); @Override boolean equals(Object o); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testSerialization() throws IOException, ClassNotFoundException { DefaultKeyedValues2D kv2D1 = new DefaultKeyedValues2D(); kv2D1.addValue(234.2, "Row1", "Col1"); kv2D1.addValue(null, "Row1", "Col2"); kv2D1.addValue(345.9, "Row2", "Col1"); kv2D1.addValue(452.7, "Row2", "Col2"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(kv2D1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); DefaultKeyedValues2D kv2D2 = (DefaultKeyedValues2D) in.readObject(); in.close(); assertEquals(kv2D1, kv2D2); }