@Test
public void testLhsComparator() {

    Comparator comp = new Comparator<String>() {
        @Override
        public int compare(String s, String t1) {
            if (s.equals(t1)) {
                return 0;
            } else {
                return 1;
            }
        }
        @Override
        public boolean equals(Object o) {
            return false;
        }
    };
    Pair pair = new Pair("lhs", "rhs");
    Pair compare1 = new Pair<>("foo", "bar");
    Pair compare2 = new Pair<>("baz", "baz");
    Assert.assertEquals(0, pair.lhsComparator(comp).compare(compare1, compare1));
    Assert.assertEquals(1, pair.lhsComparator(comp).compare(compare1, compare2));
}