### Question:
DefaultKeyedValues implements KeyedValues, Cloneable,
        PublicCloneable, Serializable { @Override public List<Comparable> getKeys() { return new ArrayList<Comparable>(this.keys); } DefaultKeyedValues(); @Override int getItemCount(); @Override Number getValue(int item); @Override Comparable getKey(int index); @Override int getIndex(Comparable key); @Override List<Comparable> getKeys(); @Override Number getValue(Comparable key); void addValue(Comparable key, double value); void addValue(Comparable key, Number value); void setValue(Comparable key, double value); void setValue(Comparable key, Number value); void insertValue(int position, Comparable key, double value); void insertValue(int position, Comparable key, Number value); void removeValue(int index); void removeValue(Comparable key); void clear(); void sortByKeys(SortOrder order); void sortByValues(SortOrder order); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testGetKeys() { DefaultKeyedValues d = new DefaultKeyedValues(); List keys = d.getKeys(); assertTrue(keys.isEmpty()); d.addValue("A", 1.0); keys = d.getKeys(); assertEquals(1, keys.size()); assertTrue(keys.contains("A")); d.addValue("B", 2.0); keys = d.getKeys(); assertEquals(2, keys.size()); assertTrue(keys.contains("A")); assertTrue(keys.contains("B")); d.clear(); keys = d.getKeys(); assertEquals(0, keys.size()); }