@Override
  public void putAll(Map<? extends K, ? extends Writable> t) {
    for (Map.Entry<? extends K, ? extends Writable> e:
      t.entrySet()) {
      put(e.getKey(), e.getValue());
    }
  }
@Test(timeout = 10000)
  public void testPutAll() {
    SortedMapWritable<Text> map1 = new SortedMapWritable<Text>();
    SortedMapWritable<Text> map2 = new SortedMapWritable<Text>();
    map1.put(new Text("key"), new Text("value"));
    map2.putAll(map1);

    assertEquals("map1 entries don't match map2 entries", map1, map2);
    assertTrue(
        "map2 doesn't have class information from map1",
        map2.classToIdMap.containsKey(Text.class)
            && map2.idToClassMap.containsValue(Text.class));
  }