protected boolean isShadedJar(Dependency dependency, Dependency nextDependency) {
        if (dependency == null || dependency.getFileName() == null
                || nextDependency == null || nextDependency.getFileName() == null
                || dependency.getSoftwareIdentifiers().isEmpty()
                || nextDependency.getSoftwareIdentifiers().isEmpty()) {
            return false;
        }
        final String mainName = dependency.getFileName().toLowerCase();
        final String nextName = nextDependency.getFileName().toLowerCase();
        if (mainName.endsWith(".jar") && nextName.endsWith("pom.xml")) {
            return dependency.getSoftwareIdentifiers().containsAll(nextDependency.getSoftwareIdentifiers());
        } else if (nextName.endsWith(".jar") && mainName.endsWith("pom.xml")) {
            return nextDependency.getSoftwareIdentifiers().containsAll(dependency.getSoftwareIdentifiers());
        }
        return false;
    }
@Test
    public void testIsShaded() throws MalformedPackageURLException {
        DependencyBundlingAnalyzer instance = new DependencyBundlingAnalyzer();

        Dependency left = null;
        Dependency right = null;

        boolean expResult = false;
        boolean result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left = new Dependency();
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left = new Dependency(new File("/path/jar.jar"), true);
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        right = new Dependency();
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        right = new Dependency(new File("/path/pom.xml"), true);
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left.addSoftwareIdentifier(new PurlIdentifier("maven", "test", "test", "1.0", Confidence.HIGHEST));
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        right.addSoftwareIdentifier(new PurlIdentifier("maven", "next", "next", "1.0", Confidence.HIGHEST));
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left.addSoftwareIdentifier(new PurlIdentifier("maven", "next", "next", "1.0", Confidence.HIGHEST));
        expResult = true;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left = new Dependency(new File("/path/pom.xml"), true);
        left.addSoftwareIdentifier(new PurlIdentifier("maven", "test", "test", "1.0", Confidence.HIGHEST));
        right = new Dependency(new File("/path/jar.jar"), true);
        right.addSoftwareIdentifier(new PurlIdentifier("maven", "next", "next", "1.0", Confidence.HIGHEST));
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        right.addSoftwareIdentifier(new PurlIdentifier("maven", "test", "test", "1.0", Confidence.HIGHEST));
        expResult = true;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);

        left = new Dependency(new File("/path/other.jar"), true);
        left.addSoftwareIdentifier(new PurlIdentifier("maven", "test", "test", "1.0", Confidence.HIGHEST));
        right = new Dependency(new File("/path/jar.jar"), true);
        right.addSoftwareIdentifier(new PurlIdentifier("maven", "next", "next", "1.0", Confidence.HIGHEST));
        expResult = false;
        result = instance.isShadedJar(left, right);
        assertEquals(expResult, result);
    }