JDKClassResetter { public static void reset(){ if(renderingHintsKeyIdentityMap != null){ renderingHintsKeyIdentityMap.clear(); renderingHintsKeyIdentityMap.putAll(renderingHintsKeyIdentityMapCopy); } }  static void init(); static void reset();  }
@Test public void testReset() throws Exception { JDKClassResetter.init(); int keyValue = 1234567; FooKey first = new FooKey(keyValue); try{ FooKey copy = new FooKey(keyValue); fail(); } catch(Exception e){ } JDKClassResetter.reset(); FooKey copy = new FooKey(keyValue); }