InterLayerPropagationGraph { public SortedSet<Demand> getDemandsInGraph () { return interLayerPropagationGraph.vertexSet().stream().filter(e->e.isDemand()).map(e->e.getDemand()).collect(Collectors.toCollection(TreeSet::new)); } InterLayerPropagationGraph(SortedSet<Demand> initialDemands , SortedSet<Link> initialLinks ,
			SortedSet<Pair<MulticastDemand,Node>> initialMDemands , boolean upWards); SortedSet<IPGNode> getInitialIPGVertices(); SortedMap<Demand, IPGNode> getDemand2IGPVertexMap(); SortedMap<Link, IPGNode> getLink2IGPVertexMap(); SortedMap<Pair<MulticastDemand, Node>, IPGNode> getmDemandAndNode2VertexMap(); boolean isUpWardsTrueDownwardsFalse(); DirectedAcyclicGraph<IPGNode, Object> getInterLayerPropagationGraph(); SortedSet<Link> getLinksInGraph(); SortedSet<Demand> getDemandsInGraph(); SortedSet<Pair<MulticastDemand,Node>> getMulticastDemandFlowsInGraph();  }
@Test public void testGetDemandsInGraph() { assertEquals(g_demand23_L2_up.getDemandsInGraph() , new TreeSet<> (Arrays.asList(demand23_L2))); assertEquals(g_demand23_L2_down.getDemandsInGraph() , new TreeSet<> (Arrays.asList(demand23_L2 , demand23_L0_CL2))); assertEquals(g_mDemand123_L2_N1_up.getDemandsInGraph() , new TreeSet<> (Arrays.asList())); assertEquals(g_mDemand123_L2_N1_down.getDemandsInGraph() , new TreeSet<> (Arrays.asList(demand12_L0_CL1))); assertEquals(g_link12_L0_up.getDemandsInGraph() , new TreeSet<> (Arrays.asList(demand12_L0_CL1 , demand12_L2))); assertEquals(g_link12_L0_down.getDemandsInGraph() , new TreeSet<> (Arrays.asList())); assertEquals(g_link13_L0_down.getDemandsInGraph() , new TreeSet<> (Arrays.asList())); assertEquals(g_link13_L0_up.getDemandsInGraph() , new TreeSet<> (Arrays.asList(demand13_L0_CL1 , demand13_L1_cL2))); }