### Question:
SortedMapWritable extends AbstractMapWritable implements SortedMap<WritableComparable, Writable> { @Override public Writable put(WritableComparable key, Writable value) { addToMap(key.getClass()); addToMap(value.getClass()); return instance.put(key, value); } SortedMapWritable();  SortedMapWritable(SortedMapWritable other); @Override Comparator<? super WritableComparable> comparator(); @Override WritableComparable firstKey(); @Override SortedMap<WritableComparable, Writable> headMap(WritableComparable toKey); @Override WritableComparable lastKey(); @Override SortedMap<WritableComparable, Writable> subMap(WritableComparable fromKey, WritableComparable toKey); @Override SortedMap<WritableComparable, Writable> tailMap(WritableComparable fromKey); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<java.util.Map.Entry<WritableComparable, Writable>> entrySet(); @Override Writable get(Object key); @Override boolean isEmpty(); @Override Set<WritableComparable> keySet(); @Override Writable put(WritableComparable key, Writable value); @Override void putAll(Map<? extends WritableComparable, ? extends Writable> t); @Override Writable remove(Object key); @Override int size(); @Override Collection<Writable> values(); @SuppressWarnings("unchecked") @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test @SuppressWarnings("deprecation") public void testForeignClass() { SortedMapWritable inMap = new SortedMapWritable(); inMap.put(new Text("key"), new UTF8("value")); inMap.put(new Text("key2"), new UTF8("value2")); SortedMapWritable outMap = new SortedMapWritable(inMap); SortedMapWritable copyOfCopy = new SortedMapWritable(outMap); assertEquals(1, copyOfCopy.getNewClasses()); }