WritableName { public static synchronized void setName(Class<?> writableClass, String name) { CLASS_TO_NAME.put(writableClass, name); NAME_TO_CLASS.put(name, writableClass); } private  WritableName(); static synchronized void setName(Class<?> writableClass, String name); static synchronized void addName(Class<?> writableClass, String name); static synchronized String getName(Class<?> writableClass); static synchronized Class<?> getClass(String name, Configuration conf
                                            );  }
@Test public void testSetName() throws Exception { Configuration conf = new Configuration(); WritableName.setName(SimpleWritable.class, testName); Class<?> test = WritableName.getClass(testName,conf); assertTrue(test.equals(SimpleWritable.class)); }