protected Dependency getMainDotnetDependency(Dependency dependency1, Dependency dependency2) {
        if (dependency1.getName() != null && dependency1.getVersion() != null
                && dependency2.getName() != null && dependency2.getVersion() != null
                && Ecosystem.DOTNET.equals(dependency1.getEcosystem())
                && Ecosystem.DOTNET.equals(dependency2.getEcosystem())
                && dependency1.getName().equals(dependency2.getName())
                && dependency1.getVersion().equals(dependency2.getVersion())) {
            if (dependency1.isVirtual()) {
                return dependency2;
            }
            return dependency1;
        }
        return null;
    }
@Test
    public void testGetMainDotnetDependency() {
        Dependency dependency1 = new Dependency(BaseTest.getResourceAsFile(this, "log4net.dll"));
        dependency1.setEcosystem(AssemblyAnalyzer.DEPENDENCY_ECOSYSTEM);
        dependency1.setName("log4net");
        dependency1.setVersion("1.2.13");
        Dependency dependency2 = new Dependency(true);
        dependency2.setEcosystem(NugetconfAnalyzer.DEPENDENCY_ECOSYSTEM);
        dependency2.setName("test");
        dependency2.setVersion("1.2.13");
        DependencyMergingAnalyzer instance = new DependencyMergingAnalyzer();
        Dependency expResult = null;
        Dependency result = instance.getMainDotnetDependency(dependency1, dependency2);
        assertEquals(expResult, result);
        dependency2.setName("log4net");
        expResult = dependency1;
        result = instance.getMainDotnetDependency(dependency1, dependency2);
        assertEquals(expResult, result);
        result = instance.getMainDotnetDependency(dependency2, dependency1);
        assertEquals(expResult, result);
    }