Adapt TransportPCE code to Sulfur
[transportpce.git] / tapi / src / test / java / org / opendaylight / transportpce / tapi / topology / TapiTopologyImplTest.java
index d5925d5bf8b1fa18133a188f00784e052b22fc61..8e615cb4b8ddaa623c45a59be39be3fe4e395f35 100644 (file)
@@ -628,10 +628,12 @@ public class TapiTopologyImplTest extends AbstractTest {
             Uint64.valueOf(100), link.getTotalPotentialCapacity().getTotalSize().getValue());
         if ("OTU4".equals(prefix)) {
             assertEquals("otn link should be between 2 nodes of protocol layers PHOTONIC_MEDIA",
-                LayerProtocolName.PHOTONICMEDIA.getName(), link.getLayerProtocolName().get(0).getName());
+                LayerProtocolName.PHOTONICMEDIA.getName(),
+                link.getLayerProtocolName().stream().findFirst().get().getName());
         } else if ("ODTU4".equals(prefix)) {
             assertEquals("otn link should be between 2 nodes of protocol layers ODU",
-                LayerProtocolName.ODU.getName(), link.getLayerProtocolName().get(0).getName());
+                LayerProtocolName.ODU.getName(),
+                link.getLayerProtocolName().stream().findFirst().get().getName());
         }
         assertEquals("transitional link should be BIDIRECTIONAL",
             ForwardingDirection.BIDIRECTIONAL, link.getDirection());