ReflectionUtils { static void clearCache() { CONSTRUCTOR_CACHE.clear(); }  static void setConf(Object theObject, Configuration conf); @SuppressWarnings("unchecked") static T newInstance(Class<T> theClass, Configuration conf); static void setContentionTracing(boolean val); synchronized static void printThreadInfo(PrintStream stream,
                                     String title); static void logThreadInfo(Log log,
                                   String title,
                                   long minInterval); @SuppressWarnings("unchecked") static Class<T> getClass(T o); @SuppressWarnings("unchecked") static T copy(Configuration conf, 
                                T src, T dst); @Deprecated static void cloneWritableInto(Writable dst, 
                                       Writable src); static List<Field> getDeclaredFieldsIncludingInherited(Class<?> clazz); static List<Method> getDeclaredMethodsIncludingInherited(Class<?> clazz);  }
@Test public void testCache() throws Exception { assertEquals(0, cacheSize()); doTestCache(); assertEquals(toConstruct.length, cacheSize()); ReflectionUtils.clearCache(); assertEquals(0, cacheSize()); }