void fetchSCMMetaData(GoPluginDescriptor pluginDescriptor) {
        try {
            SCMPropertyConfiguration scmConfiguration = scmExtension.getSCMConfiguration(pluginDescriptor.id());
            if (scmConfiguration == null) {
                throw new RuntimeException(format("Plugin[%s] returned null SCM configuration", pluginDescriptor.id()));
            }
            SCMView scmView = scmExtension.getSCMView(pluginDescriptor.id());
            if (scmView == null) {
                throw new RuntimeException(format("Plugin[%s] returned null SCM view", pluginDescriptor.id()));
            }
            scmMetadataStore.addMetadataFor(pluginDescriptor.id(), new SCMConfigurations(scmConfiguration), scmView);
        } catch (GoPluginFrameworkException e) {
            LOGGER.error("Failed to fetch SCM metadata for plugin : {}", pluginDescriptor.id(), e);
        }
    }
@Test
    public void shouldFetchSCMMetadataForPluginsWhichImplementSCMExtensionPoint() {
        SCMPropertyConfiguration scmPropertyConfiguration = new SCMPropertyConfiguration();
        scmPropertyConfiguration.add(new SCMProperty("k1").with(SCMProperty.REQUIRED, true).with(SCMProperty.PART_OF_IDENTITY, false));

        when(scmExtension.getSCMConfiguration(pluginDescriptor.id())).thenReturn(scmPropertyConfiguration);
        when(scmExtension.getSCMView(pluginDescriptor.id())).thenReturn(createSCMView("display-value", "template"));

        metadataLoader.fetchSCMMetaData(pluginDescriptor);

        SCMConfigurations configurationMetadata = SCMMetadataStore.getInstance().getConfigurationMetadata(pluginDescriptor.id());
        assertThat(configurationMetadata.size()).isEqualTo(1);
        SCMConfiguration scmConfiguration = configurationMetadata.get("k1");
        assertThat(scmConfiguration.getKey()).isEqualTo("k1");
        assertThat(scmConfiguration.getOption(SCMProperty.REQUIRED)).isTrue();
        assertThat(scmConfiguration.getOption(SCMProperty.PART_OF_IDENTITY)).isFalse();
        SCMView viewMetadata = SCMMetadataStore.getInstance().getViewMetadata(pluginDescriptor.id());
        assertThat(viewMetadata.displayValue()).isEqualTo("display-value");
        assertThat(viewMetadata.template()).isEqualTo("template");
    }