### Question:
TreeFacetField implements Comparable<TreeFacetField>, Serializable, Cloneable { public long recalculateChildCount() { childCount = 0; if (hasChildren()) { for (TreeFacetField childNode : hierarchy) { childCount += childNode.recalculateChildCount(); } } return getTotal(); } TreeFacetField(String label, String value, long count, long childCount, SortedSet<TreeFacetField> hierarchy); String getLabel(); String getValue(); long getCount(); long getChildCount(); long getTotal(); SortedSet<TreeFacetField> getHierarchy(); boolean hasChildren(); long recalculateChildCount(); @Override int compareTo(TreeFacetField o); SimpleOrderedMap<Object> toMap(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override TreeFacetField clone();  }### Answer:
@Test public void recalculateChildCount_nullHierarchy() { TreeFacetField test = new TreeFacetField("label", "value", 0, 0, null); assertEquals(0, test.recalculateChildCount()); }