### Question:
ExtensionLoader { public Map<String, T> getExtensions() { if (cacheExtensions == null) { cacheExtensions = new ConcurrentHashMap<>(); getExtensionClasses(); for (Map.Entry<String, Class<T>> entry : extensionClasses.entrySet()) { Class<T> clazz = entry.getValue(); T instance; try { instance = clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new IllegalStateException(e); } cacheExtensions.putIfAbsent(entry.getKey(), instance); } } return Collections.unmodifiableMap(cacheExtensions); } private  ExtensionLoader(Class<T> type); @SuppressWarnings("unchecked") static ExtensionLoader<T> getExtensionLoader(Class<T> clazz); T getExtension(String extensionName); Map<String, T> getExtensions();  }### Answer:
@Test public void getExtensions() { ExtensionLoader<IExtensionTest> extensionLoader = ExtensionLoader.getExtensionLoader(IExtensionTest.class); assertEquals(extensionLoader.getExtensions().size(), 2); }