### Question:
ExtensionLoader { public static <T> T getExtension(Class<T> clazz) { T extension = (T) extensionMap.get(clazz); if (extension == null) { synchronized (extensionMap) { extension = (T) extensionMap.get(clazz); if (extension == null) { extension = newExtension(clazz); if (extension != null) { extensionMap.put(clazz, extension); } else { throw new RpcException("No implement of " + clazz.getName() + ", please check spi config"); } } } } return extension; } private  ExtensionLoader(); static T getExtension(Class<T> clazz); static T getExtensionWithName(Class<T> clazz, String name); static List<T> getExtensionListByRole(Class<T> clazz, RpcRole role); static T getExtensionByRole(Class<T> clazz, RpcRole role); static List<T> getExtensionList(Class<T> clazz); static T getNewExtension(Class<T> clazz); static List<T> newExtensionList(Class<T> clazz);  }### Answer:
@Test public void testGetExtension() { Extension extension = ExtensionLoader.getExtension(Extension.class); Assert.assertNotNull(extension); }