### Question:
MultiComparator implements Comparator<T>, Serializable { @Override public int compare(T o1, T o2) { if (o1.getClass().isArray()) { return innerCompare(ev.evaluate((Object[]) o1), ev.evaluate((Object[]) o2)); } else { return innerCompare(ev.evaluate(o1), ev.evaluate(o2)); } } MultiComparator(Evaluator<Object[]> ev, boolean[] directions); @Override int compare(T o1, T o2);  }### Answer:
@Test public void test() { MultiComparator<Object[]> comparator = new MultiComparator<Object[]>(evaluator, new boolean[]{true, true}); assertTrue(comparator.compare(new Object[]{"a", "b"}, new Object[]{"a","c"}) < 0); assertTrue(comparator.compare(new Object[]{"b", "a"}, new Object[]{"a","b"}) > 0); assertTrue(comparator.compare(new Object[]{"b", "b"}, new Object[]{"b","b"}) == 0); }