ArgNodeComparators { public static ArgNodeComparator targetFirst() { return new TargetFirst(); } private  ArgNodeComparators(); static ArgNodeComparator creationAsc(); static ArgNodeComparator creationDesc(); static ArgNodeComparator invert(final ArgNodeComparator comparator); static ArgNodeComparator combine(final ArgNodeComparator first, final ArgNodeComparator then); static ArgNodeComparator bfs(); static ArgNodeComparator dfs(); static ArgNodeComparator targetFirst();  }
@Test public void testTargetFirst() { nodes.sort(combine(targetFirst(), creationAsc())); Assert.assertArrayEquals(new ArgNode[]{s20, s11, s0, s10, s21, s12}, nodes.toArray()); }