Flow extends AbstractMultiContainer<TFlow> implements IFlow { public List<Link> getLinks() { return Collections.unmodifiableList(links); } Flow(TFlow wrappedFlow, IContainer parent); List<Link> getLinks(); Link addLink(String name); void removeLink(ILink l); @Override void visit(IVisitor v);  }
@Test public void testPrefilledFlow() throws Exception { TLinks links = nativeFlow.getLinks(); links.addNewLink().setName("L1"); links.addNewLink().setName("L2"); flow = new Flow(nativeFlow, null); List<Link> linkList = flow.getLinks(); assertEquals(2, linkList.size()); assertEquals("L1", linkList.get(0).getName()); assertEquals("L2", linkList.get(1).getName()); }