### Question:
NodeUtils { public static final int compareAncestor(final IntsRef n1, final IntsRef n2) { return compareAncestor(n1.ints, n1.length, n2.ints, n2.length); }  static final int compare(final IntsRef n1, final IntsRef n2); static final int compareAncestor(final IntsRef n1, final IntsRef n2); static final int compareAncestor(final int[] n1, final int n1Len,
                                          final int[] n2, final int n2Len); static final boolean isConstraintSatisfied(final IntsRef node,
                                                    final int level,
                                                    final int[] levelIndex,
                                                    final int[][] constraints); static final boolean isConstraintSatisfied(final IntsRef node,
                                                    final int level,
                                                    final int[] constraint); static final boolean isConstraintSatisfied(final IntsRef node,
                                                    final int level);  }### Answer:
@Test public void testCompareAncestor() { IntsRef n1 = node(0, 0, 0); IntsRef n2 = node(1, 0, 0); assertTrue(NodeUtils.compareAncestor(n1, n2) < 0); n1 = node(1, 1, 0); n2 = node(1, 0, 0); assertTrue(NodeUtils.compareAncestor(n1, n2) > 0); n1 = node(1, 1, 0); n2 = node(1, 1, 0); assertTrue(NodeUtils.compareAncestor(n1, n2) > 0); n1 = node(1, 1); n2 = node(1, 1, 0); assertTrue(NodeUtils.compareAncestor(n1, n2) == 0); }