### Question:
ExtensionLoader { public T getExtension(String extensionName) { T extension = getExtensions().get(extensionName); if (extension != null) { return extension; } throw new IllegalStateException("No extension named " + extensionName + " for class " + type.getName() + "!"); } 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 getExtension() { ExtensionLoader<IExtensionTest> extensionLoader = ExtensionLoader.getExtensionLoader(IExtensionTest.class); IExtensionTest iExtensionTest = extensionLoader.getExtension("imp1"); assert iExtensionTest != null; }