@Override
    public void pluginLoaded(GoPluginDescriptor pluginDescriptor) {
        super.pluginLoaded(pluginDescriptor);

        if(extension.canHandlePlugin(pluginDescriptor.id())) {
            for (PluginMetadataChangeListener listener: listeners) {
                listener.onPluginMetadataCreate(pluginDescriptor.id());
            }
        }
    }
@Test
    public void onPluginLoaded_shouldAddPluginInfoToMetadataStore() throws Exception {
        GoPluginDescriptor descriptor =  GoPluginDescriptor.builder().id("plugin1").build();
        AnalyticsMetadataLoader metadataLoader = new AnalyticsMetadataLoader(pluginManager, metadataStore, infoBuilder, extension);
        AnalyticsPluginInfo pluginInfo = new AnalyticsPluginInfo(descriptor, null, null, null);

        when(extension.canHandlePlugin(descriptor.id())).thenReturn(true);
        when(infoBuilder.pluginInfoFor(descriptor)).thenReturn(pluginInfo);

        metadataLoader.pluginLoaded(descriptor);

        verify(metadataStore).setPluginInfo(pluginInfo);
    }