BranchesList implements Iterable<Branch> { public List<Branch> asList() { return new ArrayList<>(list); } 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 testThatGetBranchesReturnsInternalList() { Assertions.assertThat(branchesList.asList()).isEqualTo(internalBranchList); }