### Question:
DefaultCategoryDataset extends AbstractDataset implements CategoryDataset, PublicCloneable, Serializable { public void setValue(Number value, Comparable rowKey, Comparable columnKey) { this.data.setValue(value, rowKey, columnKey); fireDatasetChanged(); } DefaultCategoryDataset(); @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 addValue(double value, Comparable rowKey,
                         Comparable columnKey); void setValue(Number value, Comparable rowKey,
                         Comparable columnKey); void setValue(double value, Comparable rowKey,
                         Comparable columnKey); void incrementValue(double 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 obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testSerialization() throws IOException, ClassNotFoundException { DefaultCategoryDataset d1 = new DefaultCategoryDataset(); d1.setValue(23.4, "R1", "C1"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(d1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); DefaultCategoryDataset d2 = (DefaultCategoryDataset) in.readObject(); in.close(); assertEquals(d1, d2); }