### Question:
ClassMetadata { public static <T> ClassInfo get(Class<T> clazz) { if (!CACHE.containsKey(clazz)) { CACHE.put(clazz, new ClassInfo(clazz)); } return CACHE.get(clazz); } ClassMetadata(); static ClassInfo get(Class<T> clazz);  }### Answer:
@Test public void testCache() { assertSame("Should return same instances of ClassInfo", get(TestClass.class), get(TestClass.class)); assertSame("Should return same instances of Method[]", get(TestClass.class).getAnnotatedMethods(Deprecated.class), get(TestClass.class).getAnnotatedMethods(Deprecated.class)); }