public void setConfigAttributes(Object attributes) {
        @SuppressWarnings("unchecked") Map<String, String> attributesMap = (Map<String, String>) attributes;
        if (attributesMap.containsKey(SCM_ID)) {
            id = attributesMap.get(SCM_ID);
        }
        if (attributesMap.containsKey(NAME)) {
            name = attributesMap.get(NAME);
        }
        this.setAutoUpdate("true".equals(attributesMap.get(AUTO_UPDATE)));
        if (attributesMap.containsKey(PLUGIN_CONFIGURATION)) {
            pluginConfiguration.setConfigAttributes(attributesMap.get(PLUGIN_CONFIGURATION));
        }
        setPluginConfigurationAttributes(attributesMap);
    }
@Test
    void shouldThrowUpOnSetConfigAttributesIfPluginIsNotAvailable() {
        try {
            Map<String, String> attributeMap = Map.of(SCM.SCM_ID, "scm-id", SCM.NAME, "scm-name", SCM.AUTO_UPDATE, "false", "url", "http://localhost");
            SCM scm = new SCM(null, new PluginConfiguration("plugin-id", "1"), new Configuration());
            scm.setConfigAttributes(attributeMap);
            fail("should have thrown exception");
        } catch (Exception e) {
            assertThat(e).isInstanceOf(RuntimeException.class);
            assertThat(e.getMessage()).isEqualTo("metadata unavailable for plugin: plugin-id");
        }
    }