public SCM findDuplicate(final SCM scm) {
         if (find(scm.getSCMId()) != null) {
             return find(scm.getSCMId());
         } else if (findByFingerprint(scm.getFingerprint()) != null) {
             return findByFingerprint(scm.getFingerprint());
         }
        return null;
    }
@Test
    void shouldFindFunctionallyDuplicateSCMs() {
        Configuration config = new Configuration();
        config.addNewConfigurationWithValue("url", "url", false);
        PluginConfiguration pluginConfig = new PluginConfiguration("plugin_id", "1.0");
        SCM scm1 = new SCM("scmid", pluginConfig, config);
        scm1.setName("noName");
        SCMs scms = new SCMs(scm1);

        SCM scm2 = new SCM("scmid", new PluginConfiguration(), new Configuration());
        SCM scm3 = new SCM("id", pluginConfig, config);

        assertThat(scms.findDuplicate(scm2)).isEqualTo(scm1);
        assertThat(scms.findDuplicate(scm3)).isEqualTo(scm1);
    }