### Question:
BookSorter implements Comparator<String[]> { @Override public int compare(String[] lhs, String[] rhs) { int result = lhs[0].compareToIgnoreCase(rhs[0]); if (result == 0) { result = lhs[1].compareToIgnoreCase(rhs[1]); } return result; }  @Override int compare(String[] lhs, String[] rhs);  }### Answer:
@Test public void testCompareLHSTitleBigAndPathBigger() { String[] lhs = {"abc1", "C:\\AmazeFileManager\\app\\abc1"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\abc"}; assertThat(bookSorter.compare(lhs, rhs), greaterThan(0)); }
@Test public void testCompareRHSTitleBigAndPathBigger() { String[] lhs = {"abc", "C:\\AmazeFileManager\\abc"}; String[] rhs = {"abc2", "C:\\AmazeFileManager\\app\\abc2"}; assertThat(bookSorter.compare(lhs, rhs), lessThan(0)); }
@Test public void testCompareTitleSameAndRHSPathBigger() { String[] lhs = {"abc", "C:\\AmazeFileManager\\app\\abc"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\abc"}; assertThat(bookSorter.compare(lhs, rhs), greaterThan(0)); }
@Test public void testCompareTitleSameAndLHSPathBigger() { String[] lhs = {"abc", "C:\\AmazeFileManager\\abc"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\app\\abc"}; assertThat(bookSorter.compare(lhs, rhs), lessThan(0)); }
@Test public void testCompareTitleSameAndPathSame() { String[] lhs = {"abc", "C:\\AmazeFileManager\\abc"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\abc"}; assertEquals(bookSorter.compare(lhs, rhs), 0); }
@Test public void testCompareTitleNotSameCaseAndLHSPathBigger() { String[] lhs = {"ABC", "C:\\AmazeFileManager\\app\\ABC"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\abc"}; assertThat(bookSorter.compare(lhs, rhs), greaterThan(0)); }
@Test public void testCompareTitleNotSameCaseAndRHSPathBigger() { String[] lhs = {"ABC", "C:\\AmazeFileManager\\ABC"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\app\\abc"}; assertThat(bookSorter.compare(lhs, rhs), lessThan(0)); }
@Test public void testCompareTitleNotSameCaseAndPathSame() { String[] lhs = {"ABC", "C:\\AmazeFileManager\\ABC"}; String[] rhs = {"abc", "C:\\AmazeFileManager\\abc"}; assertEquals(bookSorter.compare(lhs, rhs), 0); }