BranchesList implements Iterable<Branch> { public void clear() { list.clear(); } BranchesList(List<Branch> list, FlowerOptionPreferences flowerOptionPreferences); static BranchesList newInstance(); void bloomFrom(Branch branch); @Override Iterator<Branch> iterator(); void prune(Branch branch); void clear(); List<Branch> asList();  }
@Test public void testThatClearDelegatesOnInternalList() { givenThatHasBranch(); branchesList.clear(); Assertions.assertThat(branchesList).isEmpty(); }