@Test
public void testAddName() throws Exception {

  Configuration conf = new Configuration();
  String altName = testName + ".alt";
  WritableName.setName(SimpleWritable.class, testName);
  WritableName.addName(SimpleWritable.class, altName);
  Class<?> test = WritableName.getClass(altName, conf);
  assertTrue(test.equals(SimpleWritable.class));
  // check original name still works
  test = WritableName.getClass(testName, conf);
  assertTrue(test.equals(SimpleWritable.class));
}