### Question:
ExtensionLoader { public static <T> List<T> getExtensionList(Class<T> clazz) { List<T> extensions = (List<T>) extensionListMap.get(clazz); if (extensions == null) { synchronized (extensionListMap) { extensions = (List<T>) extensionListMap.get(clazz); if (extensions == null) { extensions = newExtensionList(clazz); if (!extensions.isEmpty()) { extensionListMap.put(clazz, extensions); } } } } return extensions; } 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 testGetExtensionList() { List<Extension> extensionList = ExtensionLoader.getExtensionList(Extension.class); for (Extension extension : extensionList) { Assert.assertTrue(extension instanceof FirstExtension || extension instanceof SecondExtension); } }