package org.apache.cassandra.db;

import org.testng.annotations.Test;

import java.util.Comparator;

public class ColumnComparatorFactoryTest {
    public Comparator<IColumn> nameComparator;

    @Test
    public void testLT() {
        IColumn col1 = new Column("Column-8");
        IColumn col2 = new Column("Column-9");
        nameComparator = ColumnComparatorFactory.getComparator(ColumnComparatorFactory.ComparatorType.NAME);
        assert nameComparator.compare(col1, col2) < 0;
    }

    @Test
    public void testGT() {
        IColumn col1 = new Column("Column-9");
        IColumn col2 = new Column("Column-10");
        // tricky -- remember we're comparing _lexically_
        assert nameComparator.compare(col1, col2) > 0;
	}
}

@@ -182,16 +182,102 @@
 mparator
+  = ColumnComparatorFactory.getComparator(ColumnComparatorFactory.ComparatorType.NAME)
 ;%0A%0A    @
@@ -406,117 +406,8 @@
 %22);%0A
-        nameComparator = ColumnComparatorFactory.getComparator(ColumnComparatorFactory.ComparatorType.NAME);%0A
     

fix ColumnComparatorFactoryTest. patch by Jun Rao; reviewed by jbellis for #82