### Question:
NodeBuilderBaseImpl { public B clearParents() { parents.clear(); parentsWithConditions.clear(); return ensureRuntimeSelfReference(); } NodeBuilderBaseImpl();   NodeBuilderBaseImpl(final Node node); B withErrorHandler(final ErrorHandler errorHandler); B withoutErrorHandler(); B withName(final String name); B withCredential(final Credential credential); B withoutCredential(final Credential credential); B clearCredentials(); B withRetryMax(final Integer retryMax); B withRetryInterval(final Integer retryInterval); B withRetryPolicy(final String retryPolicy); B withParent(final Node parent); B withParentWithCondition(final Node parent, final String condition); B withParentDefaultConditional(final Node parent); B withoutParent(final Node parent); B clearParents();  }### Answer:
@Test public void testClearParents() { final N parent1 = Mockito.spy(getBuilderInstance().build()); final N parent2 = Mockito.spy(getBuilderInstance().build()); final N parent3 = Mockito.spy(getBuilderInstance().build()); final B builder = getBuilderInstance(); builder.withParent(parent1) .withParent(parent2) .withParentWithCondition(parent3, "any_condition"); builder.clearParents(); final N child = builder.build(); assertEquals(0, child.getAllParents().size()); Mockito.verifyNoMoreInteractions(parent1); Mockito.verifyNoMoreInteractions(parent2); Mockito.verifyNoMoreInteractions(parent3); }