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 shouldThrowExceptionWhenNullSCMConfigurationReturned() {
        when(scmExtension.getSCMConfiguration(pluginDescriptor.id())).thenReturn(null);
        try {
            metadataLoader.fetchSCMMetaData(pluginDescriptor);
        } catch (Exception e) {
            assertThat(e.getMessage()).isEqualTo("Plugin[plugin-id] returned null SCM configuration");
        }
        assertThat(SCMMetadataStore.getInstance().getConfigurationMetadata(pluginDescriptor.id())).isNull();
    }