### Question:
CanonicalNodeOrder extends NodeOrdering { public int bucket(final Node ref, final int depth) { return CanonicalNodeNameOrder.bucket(ref.getName(), depth); }  @Override int compare(Node nr1, Node nr2); int bucket(final Node ref, final int depth); static final CanonicalNodeOrder INSTANCE; }### Answer:
@Test public void testBucket() { Node node = RevObjectFactory.defaultInstance().createNode("Lines.1", ObjectId.valueOf("abc123000000000000001234567890abcdef0001"), ObjectId.NULL, TYPE.FEATURE, null, null); Node node2 = RevObjectFactory.defaultInstance().createNode("Lines.1", ObjectId.valueOf("abc123000000000000001234567890abcdef0001"), ObjectId.valueOf("abc123000000000000001234567890abcdef0002"), TYPE.TREE, null, null); for (int i = 0; i < 8; i++) { assertEquals(CanonicalNodeOrder.INSTANCE.bucket(node, i), CanonicalNodeOrder.INSTANCE.bucket(node2, i)); } try { CanonicalNodeOrder.INSTANCE.bucket(node, 8); fail(); } catch (Exception e) { assertTrue(e instanceof IllegalArgumentException); } assertThrows(IllegalArgumentException.class, () -> CanonicalNodeOrder.INSTANCE.bucket(node, -1)); }