X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Ftapi%2Ftopology%2FConvertORTopoToTapiTopoTest.java;h=ac12edd36bf744e829dcd43c63cfd13ed54f9665;hb=refs%2Fchanges%2F46%2F100646%2F27;hp=fea176c1658ab92c4c0d9840b3dcbfd4d7accc91;hpb=211dacfed540c8ddbf552c229c74b6054b185720;p=transportpce.git diff --git a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToTapiTopoTest.java b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToTapiTopoTest.java index fea176c16..ac12edd36 100644 --- a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToTapiTopoTest.java +++ b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToTapiTopoTest.java @@ -824,7 +824,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest { assertEquals("otsi node should manage a single protocol layer : PHOTONIC_MEDIA", 1, node.getLayerProtocolName().size()); assertEquals("otsi node should manage a single protocol layer : PHOTONIC_MEDIA", - LayerProtocolName.PHOTONICMEDIA, node.getLayerProtocolName().get(0)); + LayerProtocolName.PHOTONICMEDIA, + node.getLayerProtocolName().stream().findFirst().get()); List nepsI = node.nonnullOwnedNodeEdgePoint().values().stream() .filter(n -> n.getName().containsKey(new NameKey("iNodeEdgePoint"))) .sorted((nep1, nep2) -> nep1.getUuid().getValue().compareTo(nep2.getUuid().getValue())) @@ -1292,10 +1293,12 @@ public class ConvertORTopoToTapiTopoTest 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("otn tapi link should be BIDIRECTIONAL", ForwardingDirection.BIDIRECTIONAL, link.getDirection()); @@ -1328,7 +1331,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest { assertEquals("bad name for the link", linkName, link.getName().get(new NameKey("OMS link name")).getValue()); assertEquals("bad uuid for link", linkUuid, link.getUuid()); assertEquals("oms 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()); assertEquals("otn tapi link should be BIDIRECTIONAL", ForwardingDirection.BIDIRECTIONAL, link.getDirection()); List