FilePair { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final FilePair other = (FilePair) obj; if (Objects.equals(this.file1, other.file1) && Objects.equals(this.file2, other.file2)) { return true; } if (Objects.equals(this.file1, other.file2) && Objects.equals(this.file2, other.file1)) { return true; } return false; } FilePair(String file1, String file2);  FilePair(String file1, String file2, FilePairApriori apriori); void orderFilePairByConfidence(FilePairApriori apriori); String getFile1(); String getFile2(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); String toString(FilePairApriori apriori); static String getToStringHeader();  }
@Test public void testEquals() { FilePair ab = new FilePair("A", "B"); FilePair ba = new FilePair("B", "A"); assertTrue(instance.equals(ab)); assertTrue(instance.equals(ba)); assertEquals(instance.hashCode(), ab.hashCode()); assertEquals(instance.hashCode(), ba.hashCode()); }