BranchesList implements Iterable<Branch> { public void prune(Branch branch) { list.remove(branch); } 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 testThatPruneRemovesBranch() { Branch branch = givenThatHasBranch(); branchesList.prune(branch); Assertions.assertThat(branchesList).isEmpty(); }