Migrate to Al and reactivate some Junit tests
[transportpce.git] / tapi / src / test / java / org / opendaylight / transportpce / tapi / utils / TopologyDataUtils.java
index dbc82005c03b57d5dc951d0681852c1bdb7bb386..fac97ffd99c8ce82c37a03c6399b28c0df4fd46b 100644 (file)
@@ -70,7 +70,8 @@ public final class TopologyDataUtils {
         } else {
             LOG.error("xml file {} not found at {}", topoFile.getName(), topoFile.getAbsolutePath());
         }
-        writeTransaction(dataStoreContextUtil.getDataBroker(), ii, networks.getNetwork().get(0));
+        writeTransaction(dataStoreContextUtil.getDataBroker(), ii,
+                networks.nonnullNetwork().values().stream().findFirst().get());
         LOG.info("extraction from {} stored with success in datastore", topoFile.getName());
     }