### Question:
DecisionNavigatorItem implements Comparable { @Override public int compareTo(final Object o) { if (o == null || getClass() != o.getClass()) { return 1; } final DecisionNavigatorItem that = (DecisionNavigatorItem) o; if (this.equals(that)) { return 0; } else { return getOrderingName().compareTo(that.getOrderingName()); } }  String getUUID(); String getLabel(); Type getType(); TreeSet<DecisionNavigatorItem> getChildren(); Optional<Command> getOnClick(); String getParentUUID(); void setLabel(final String label); void removeChild(final DecisionNavigatorItem item); void addChild(final DecisionNavigatorItem item); void onClick(); void onUpdate(); void onRemove(); boolean isEditable(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Object o);  }### Answer:
@Test public void testCompareToWhenObjectIsNotADecisionNavigatorItem() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").build(); final Object object = null; final int result = item.compareTo(object); assertTrue(result > 0); }
@Test public void testCompareToWhenItemAndObjectAreEqual() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("123").build(); final int result = item.compareTo(object); assertEquals(0, result); }
@Test public void testCompareToWhenItemOrderingNameIsGreaterThanObjectOrderingName() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").withLabel("Hat").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("456").withLabel("Red").build(); final int result = item.compareTo(object); assertTrue(result < 0); }
@Test public void testCompareToWhenItemOrderingNameIsLessThanObjectOrderingName() { final DecisionNavigatorItem item = new DecisionNavigatorItemBuilder().withUUID("123").withLabel("Red").build(); final Object object = new DecisionNavigatorItemBuilder().withUUID("456").withLabel("Hat").build(); final int result = item.compareTo(object); assertTrue(result > 0); }