SharedRiskGroup extends NetworkElement { public void setAsDown () { checkAttachedToNetPlanObject(); netPlan.setLinksAndNodesFailureState (null , getLinksAllLayers() , null , getNodes ()); } SharedRiskGroup(NetPlan netPlan , long id , int index , SortedSet<Node> nodes , SortedSet<Link> links , double meanTimeToFailInHours ,  double meanTimeToRepairInHours , AttributeMap attributes);   SharedRiskGroup(NetPlan netPlan , long id , int index , String className , String dynamicInitializationString , double meanTimeToFailInHours ,  double meanTimeToRepairInHours , AttributeMap attributes); boolean isDynamicSrg(); DynamicSrgImplementation getDynamicSrgImplementation(); void setDynamicImplementation(DynamicSrgImplementation impl); boolean isStaticEmptySrg(); boolean isDynamicCurrentlyEmptySrg(); static SharedRiskGroup getDummyEmptyStaticSrg(NetPlan np); static SortedSet<SharedRiskGroup> getSrgListCompletedWithDummyNoFailureStateIfNeeded(Collection<SharedRiskGroup> sourceSrgs , NetPlan np); SortedSet<Node> getNodes(); SortedSet<Link> getAffectedLinksAllLayers(); SortedSet<Link> getAffectedLinks(NetworkLayer layer); SortedSet<Route> getAffectedRoutesAllLayers(); SortedSet<Route> getAffectedRoutes(NetworkLayer layer); SortedSet<MulticastTree> getAffectedMulticastTreesAllLayers(); SortedSet<MulticastTree> getAffectedMulticastTrees(NetworkLayer layer); boolean affectsAnyOf(Collection<? extends NetworkElement> col); SortedSet<Link> getLinksAllLayers(); SortedSet<Link> getLinks(NetworkLayer layer); double getMeanTimeToFailInHours(); void setMeanTimeToFailInHours(double value); double getMeanTimeToRepairInHours(); void setMeanTimeToRepairInHours(double value); double getAvailability(); void setAsDown(); void setAsUp(); void removeLink(Link e); void removeNode(Node n); void remove(); void addLink(Link link); void addNode(Node node); String toString();  }
@Test public void testSetAsDown() { System.out.println("srgL13: " + srgL13); srgL13.setAsDown(); np.checkCachesConsistency(); assertTrue(link13.isDown()); assertTrue(!link12.isDown()); assertTrue(!link23.isDown()); assertTrue(!n1.isDown()); assertTrue(!n2.isDown()); assertTrue(!n3.isDown()); link13.setFailureState(true); np.checkCachesConsistency(); srgN1L23.setAsDown(); np.checkCachesConsistency(); assertTrue(!link13.isDown()); assertTrue(!link12.isDown()); assertTrue(link23.isDown()); assertTrue(n1.isDown()); assertTrue(!n2.isDown()); assertTrue(!n3.isDown()); }