FilePair { @Override public String toString() { StringBuilder toString = new StringBuilder(); toString.append(file1).append(';').append(file2).append(';'); return toString.toString(); } 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 testToString() { assertEquals("A;B;", instance.toString()); }
@Test public void testToStringAprioriBasedBA() { FilePairApriori filePairApriori = new FilePairApriori(2, 1, 1, 3); assertEquals("B;A;", instance.toString(filePairApriori)); }
@Test public void testToStringAprioriBasedAB() { FilePairApriori filePairApriori = new FilePairApriori(1, 2, 1, 3); assertEquals("A;B;", instance.toString(filePairApriori)); }
@Test public void testConstructorAprioriBasedBA() { FilePairApriori apriori = new FilePairApriori(2, 1, 1, 3); FilePair filePairAB = new FilePair("A", "B", apriori); assertTrue(apriori.getConfidence() < apriori.getConfidence2()); assertEquals("B;A;", filePairAB.toString()); }
@Test public void testConstructorAprioriBasedAB() { FilePairApriori apriori = new FilePairApriori(1, 2, 1, 3); FilePair filePairBA = new FilePair("A", "B", apriori); assertTrue(apriori.getConfidence() >= apriori.getConfidence2()); assertEquals("A;B;", filePairBA.toString()); }