@Override
    public int compareTo(@NotNull Evidence o) {
        return new CompareToBuilder()
                .append(this.source == null ? null : this.source.toLowerCase(), o.source == null ? null : o.source.toLowerCase())
                .append(this.name == null ? null : this.name.toLowerCase(), o.name == null ? null : o.name.toLowerCase())
                .append(this.value == null ? null : this.value.toLowerCase(), o.value == null ? null : o.value.toLowerCase())
                .append(this.confidence, o.getConfidence())
                .append(this.fromHint, o.isFromHint())
                .toComparison();
    }
@Test
    public void testCompareTo() {
        Evidence that0 = new Evidence("file", "name", "guice-3.0", Confidence.HIGHEST);
        Evidence that1 = new Evidence("jar", "package name", "dependency", Confidence.HIGHEST);
        Evidence that2 = new Evidence("jar", "package name", "google", Confidence.HIGHEST);
        Evidence that3 = new Evidence("jar", "package name", "guice", Confidence.HIGHEST);
        Evidence that4 = new Evidence("jar", "package name", "inject", Confidence.HIGHEST);
        Evidence that5 = new Evidence("jar", "package name", "inject", Confidence.LOW);
        Evidence that6 = new Evidence("jar", "package name", "internal", Confidence.LOW);
        Evidence that7 = new Evidence("manifest", "Bundle-Description", "Guice is a lightweight dependency injection framework for Java 5 and above", Confidence.MEDIUM);
        Evidence that8 = new Evidence("Manifest", "Implementation-Title", "Spring Framework", Confidence.HIGH);

        Evidence that9 = new Evidence("manifest", "implementation-title", "zippy", Confidence.HIGH);

        Evidence instance = new Evidence("Manifest", "Implementation-Title", "Spring Framework", Confidence.HIGH);

        int result = instance.compareTo(that0);
        assertTrue(result > 0);

        result = instance.compareTo(that1);
        assertTrue(result > 0);

        result = instance.compareTo(that2);
        assertTrue(result > 0);

        result = instance.compareTo(that3);
        assertTrue(result > 0);

        result = instance.compareTo(that4);
        assertTrue(result > 0);

        result = instance.compareTo(that5);
        assertTrue(result > 0);

        result = instance.compareTo(that6);
        assertTrue(result > 0);

        result = instance.compareTo(that7);
        assertTrue(result > 0);

        result = instance.compareTo(that8);
        assertTrue(result == 0);

        result = instance.compareTo(that9);
        assertTrue(result < 0);
    }