### Question:
ChildrenProviderHasChildrenSorting extends ChildrenProviderHasChildren <CHILDTYPE> { @Override @Nullable public ICommonsList <? extends CHILDTYPE> getAllChildren (@Nullable final CHILDTYPE aCurrent) { final ICommonsCollection <? extends CHILDTYPE> ret = aCurrent == null ? null : aCurrent.getAllChildren (); return ret == null ? null : ret.getSorted (m_aComparator); } ChildrenProviderHasChildrenSorting(@Nonnull final Comparator <? super CHILDTYPE> aComparator); @Nonnull Comparator <? super CHILDTYPE> getComparator(); @Override @Nullable ICommonsList <? extends CHILDTYPE> getAllChildren(@Nullable final CHILDTYPE aCurrent);  }### Answer:
@Test public void testAll () { final ChildrenProviderHasChildrenSorting <MockHasChildren> cr = new ChildrenProviderHasChildrenSorting <> (IHasID.getComparatorID ()); assertFalse (cr.hasChildren (null)); assertEquals (0, cr.getChildCount (null)); assertNull (cr.getAllChildren (null)); final MockHasChildren hca = new MockHasChildren ("a"); final MockHasChildren hcb = new MockHasChildren ("b"); final MockHasChildren hc1 = new MockHasChildren ("1", hcb, hca); assertTrue (cr.hasChildren (hc1)); assertFalse (cr.hasChildren (hca)); assertEquals (2, cr.getChildCount (hc1)); assertEquals (0, cr.getChildCount (hca)); assertNotNull (cr.getAllChildren (hc1)); assertNotNull (cr.getAllChildren (hca)); }