@Test
public void testAddListener(){

    ExtensionLoader<Filter> extensionLoader = ExtensionLoaderFactory.getExtensionLoader(Filter.class);
    extensionLoader.loadExtension(DynamicFilter.class);
    ConcurrentMap<String, ExtensionClass<Filter>> all = extensionLoader.all;
    String alias = "dynamic0";
    Assert.assertTrue(all.containsKey(alias));
    List<String> filters = new ArrayList<>();
    extensionLoader = ExtensionLoaderFactory.getExtensionLoader(Filter.class);
    extensionLoader.addListener( new  ExtensionLoaderListener<Filter>() {
        @Override
        public void onLoad(ExtensionClass<Filter> extensionClass) {
            filters.add(extensionClass.getAlias());
        }
    });
    Assert.assertTrue(filters.contains(alias));
}