@@ -0,0 +1,1367 @@
+package org.pharmgkb.common.comparator;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A%0A/**%0A * This is a JUnit test for %7B@link CollectionComparator%7D.%0A *%0A * @author Mark Woon%0A */%0Apublic class CollectionComparatorTest %7B%0A%0A%0A  @Test%0A  public void testNatural() %7B%0A%0A    Set%3CInteger%3E a = new HashSet%3C%3E();%0A    Set%3CInteger%3E b = new HashSet%3C%3E();%0A%0A    assertEquals(0, CollectionComparator.getComparator().compare(a, b));%0A    a.add(1);%0A    assertEquals(1, CollectionComparator.getComparator().compare(a, b));%0A    b.add(1);%0A    assertEquals(0, CollectionComparator.getComparator().compare(a, b));%0A    b.remove(1);%0A    b.add(2);%0A    assertEquals(-1, CollectionComparator.getComparator().compare(a, b));%0A    a.add(2);%0A    assertEquals(1, CollectionComparator.getComparator().compare(a, b));%0A  %7D%0A%0A  @Test%0A  public void testReverse() %7B%0A%0A    Set%3CInteger%3E a = new HashSet%3C%3E();%0A    Set%3CInteger%3E b = new HashSet%3C%3E();%0A    CollectionComparator comparator = new CollectionComparator(SortOrder.REVERSE);%0A%0A    assertEquals(0, comparator.compare(a, b));%0A    a.add(1);%0A    assertEquals(-1, comparator.compare(a, b));%0A    b.add(1);%0A    assertEquals(0, comparator.compare(a, b));%0A    b.remove(1);%0A    b.add(2);%0A    assertEquals(1, comparator.compare(a, b));%0A    a.add(2);%0A    assertEquals(-1, comparator.compare(a, b));%0A  %7D%0A%7D%0A

Add CollectionComparatorTest.