### Question:
ChildrenProviderHasChildrenWithID extends
                                               ChildrenProviderHasChildren <CHILDTYPE> implements
                                               IChildrenProviderWithID <KEYTYPE, CHILDTYPE> { @Nullable public CHILDTYPE getChildWithID (@Nullable final CHILDTYPE aCurrent, @Nullable final KEYTYPE aID) { if (aCurrent != null) { final Collection <? extends CHILDTYPE> aChildren = aCurrent.getAllChildren (); if (aChildren != null) for (final CHILDTYPE aChild : aChildren) if (aChild != null && EqualsHelper.equals (aChild.getID (), aID)) return aChild; } return null; }  @Nullable CHILDTYPE getChildWithID(@Nullable final CHILDTYPE aCurrent, @Nullable final KEYTYPE aID);  }### Answer:
@Test public void testAll () { final ChildrenProviderHasChildrenWithID <String, MockHasSortedChildren> cr = new ChildrenProviderHasChildrenWithID <> (); assertFalse (cr.hasChildren (null)); assertEquals (0, cr.getChildCount (null)); assertNull (cr.getAllChildren (null)); final MockHasSortedChildren hca = new MockHasSortedChildren ("a"); final MockHasSortedChildren hcb = new MockHasSortedChildren ("b"); final MockHasSortedChildren hc1 = new MockHasSortedChildren ("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)); assertSame (hca, cr.getChildWithID (hc1, "a")); assertNull (cr.getChildWithID (hc1, "anyid")); }