Migrate networkmodel module to JUnit5 44/104644/3
authorGilles Thouenon <gilles.thouenon@orange.com>
Sun, 26 Feb 2023 13:37:44 +0000 (14:37 +0100)
committerGilles Thouenon <gilles.thouenon@orange.com>
Sat, 4 Mar 2023 07:30:11 +0000 (08:30 +0100)
JIRA: TRNSPRTPCE-730
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I68a6718804e6013fe46a4cb41f4a8a98b4fc9ba1

13 files changed:
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmNetwork.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/NetConfTopologyListenerTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/NetworkModelProviderTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/listeners/DeviceListener121Test.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/listeners/DeviceListener221Test.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/listeners/DeviceListener710Test.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/listeners/PortMappingListenerTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/service/FrequenciesServiceTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/ClliNetworkTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmNetworkTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmOtnTopologyTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmTopologyTest.java
networkmodel/src/test/java/org/opendaylight/transportpce/networkmodel/util/TpceNetworkTest.java

index 0a62dd2a41547c13ef0666cdc514c7a3b4c6be30..83759113ad945ba92958b02cd1c34ac7a4d69486 100644 (file)
@@ -76,11 +76,11 @@ public final class OpenRoadmNetwork {
         // Sets the value of Network-ref and Node-ref as a part of the supporting node
         // attribute
         SupportingNode supportingNode = new SupportingNodeBuilder()
         // Sets the value of Network-ref and Node-ref as a part of the supporting node
         // attribute
         SupportingNode supportingNode = new SupportingNodeBuilder()
-            .setNetworkRef(new NetworkId(NetworkUtils.CLLI_NETWORK_ID))
-            .setNodeRef(new NodeId(nodeInfo.getNodeClli()))
-            .withKey(new SupportingNodeKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID),
-                new NodeId(nodeInfo.getNodeClli())))
-            .build();
+                .setNetworkRef(new NetworkId(NetworkUtils.CLLI_NETWORK_ID))
+                .setNodeRef(new NodeId(nodeInfo.getNodeClli()))
+                .withKey(new SupportingNodeKey(new NetworkId(NetworkUtils.CLLI_NETWORK_ID),
+                        new NodeId(nodeInfo.getNodeClli())))
+                .build();
 
         return new NodeBuilder()
             .setNodeId(new NodeId(nodeId))
 
         return new NodeBuilder()
             .setNodeId(new NodeId(nodeId))
index 7fc2b4c5f7ba232fccb7626ebfa919434850fe4f..7dbc8601d6ce8e52defce5061f43d86c6aa101b4 100644 (file)
@@ -21,10 +21,10 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
@@ -51,7 +51,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.common.Uint32;
 
 import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.common.Uint32;
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class NetConfTopologyListenerTest {
 
     @Mock
 public class NetConfTopologyListenerTest {
 
     @Mock
@@ -66,7 +66,7 @@ public class NetConfTopologyListenerTest {
     private Map<String, NodeRegistration> registrations;
 
     @Test
     private Map<String, NodeRegistration> registrations;
 
     @Test
-    public void testOnDataTreeChangedWhenDeleteNode() {
+    void testOnDataTreeChangedWhenDeleteNode() {
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
@@ -90,7 +90,7 @@ public class NetConfTopologyListenerTest {
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenAddNode() {
+    void testOnDataTreeChangedWhenAddNode() {
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
@@ -116,7 +116,7 @@ public class NetConfTopologyListenerTest {
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenDisconnectingNode() {
+    void testOnDataTreeChangedWhenDisconnectingNode() {
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
@@ -143,7 +143,7 @@ public class NetConfTopologyListenerTest {
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenShouldNeverHappen() {
+    void testOnDataTreeChangedWhenShouldNeverHappen() {
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
         @SuppressWarnings("unchecked") final DataObjectModification<Node> node = mock(DataObjectModification.class);
         final Collection<DataTreeModification<Node>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Node> ch = mock(DataTreeModification.class);
index 04dec312dc3c22401616a9d053e8df4c58fba81c..5f31c3bdcf4487ca2795379297602019e24b7805 100644 (file)
@@ -13,11 +13,11 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.util.concurrent.FluentFuture;
 import static org.mockito.Mockito.when;
 
 import com.google.common.util.concurrent.FluentFuture;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.stubbing.Answer;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.RpcProviderService;
 import org.mockito.stubbing.Answer;
 import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.RpcProviderService;
@@ -28,7 +28,7 @@ import org.opendaylight.transportpce.networkmodel.service.FrequenciesService;
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.TransportpceNetworkutilsService;
 
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.TransportpceNetworkutilsService;
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class NetworkModelProviderTest extends AbstractTest {
     @Mock
     NetworkTransactionService networkTransactionService;
 public class NetworkModelProviderTest extends AbstractTest {
     @Mock
     NetworkTransactionService networkTransactionService;
@@ -47,7 +47,7 @@ public class NetworkModelProviderTest extends AbstractTest {
 
 
     @Test
 
 
     @Test
-    public void networkmodelProviderInitTest() {
+    void networkmodelProviderInitTest() {
         NetworkModelProvider provider = new NetworkModelProvider(networkTransactionService, getDataBroker(),
             rpcProviderService, networkutilsService, topologyListener, notificationService,
             frequenciesService, portMappingListener);
         NetworkModelProvider provider = new NetworkModelProvider(networkTransactionService, getDataBroker(),
             rpcProviderService, networkutilsService, topologyListener, notificationService,
             frequenciesService, portMappingListener);
@@ -66,5 +66,4 @@ public class NetworkModelProviderTest extends AbstractTest {
         verify(rpcProviderService, times(1))
             .registerRpcImplementation(any(), any(TransportpceNetworkutilsService.class));
     }
         verify(rpcProviderService, times(1))
             .registerRpcImplementation(any(), any(TransportpceNetworkutilsService.class));
     }
-
 }
 }
index d2d38ae64e242eb67ac9bcf3eec7fa75618c2a1e..efe1d28943f5750a1f5e6e481d6108a5db3a307c 100644 (file)
@@ -17,10 +17,10 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.ChangeNotification;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.ChangeNotification;
@@ -35,13 +35,13 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.open
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class DeviceListener121Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
 public class DeviceListener121Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
-    public void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
+    void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
@@ -56,7 +56,7 @@ public class DeviceListener121Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenNoEditList() {
+    void testOnChangeNotificationWhenNoEditList() {
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener121 listener = new DeviceListener121("node1", portMapping);
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener121 listener = new DeviceListener121("node1", portMapping);
@@ -66,7 +66,7 @@ public class DeviceListener121Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenOtherthingUpdated() {
+    void testOnChangeNotificationWhenOtherthingUpdated() {
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
index d27cf42bd72641561c995b700f5464f0aa4c64ad..1779399df0d06418ad7a3c7b3d81be3b31aedf3f 100644 (file)
@@ -17,10 +17,10 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.ChangeNotification;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.ChangeNotification;
@@ -35,13 +35,13 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.org.open
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class DeviceListener221Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
 public class DeviceListener221Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
-    public void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
+    void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
@@ -56,7 +56,7 @@ public class DeviceListener221Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenNoEditList() {
+    void testOnChangeNotificationWhenNoEditList() {
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener221 listener = new DeviceListener221("node1", portMapping);
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener221 listener = new DeviceListener221("node1", portMapping);
@@ -66,7 +66,7 @@ public class DeviceListener221Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenOtherthingUpdated() {
+    void testOnChangeNotificationWhenOtherthingUpdated() {
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
index 56a5a4694cfc3d514565d7ea878b68185b2e57c1..0dfe7405c8255322a0f474b6412b9d08be383088 100644 (file)
@@ -17,10 +17,10 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.ChangeNotification;
 import org.opendaylight.transportpce.common.mapping.PortMapping;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.ChangeNotification;
@@ -35,13 +35,13 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.org.open
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.EditOperationType;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class DeviceListener710Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
 public class DeviceListener710Test {
     @Mock
     private PortMapping portMapping;
 
     @Test
-    public void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
+    void testOnChangeNotificationWhenPortUpdated() throws InterruptedException {
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
         ChangeNotification notification = mock(ChangeNotification.class);
         Mapping oldMapping = mock(Mapping.class);
         ImmutableList<Edit> editList = createEditList();
@@ -56,7 +56,7 @@ public class DeviceListener710Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenNoEditList() {
+    void testOnChangeNotificationWhenNoEditList() {
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener710 listener = new DeviceListener710("node1", portMapping);
         ChangeNotification notification = mock(ChangeNotification.class);
         when(notification.getEdit()).thenReturn(null);
         DeviceListener710 listener = new DeviceListener710("node1", portMapping);
@@ -66,7 +66,7 @@ public class DeviceListener710Test {
     }
 
     @Test
     }
 
     @Test
-    public void testOnChangeNotificationWhenOtherthingUpdated() {
+    void testOnChangeNotificationWhenOtherthingUpdated() {
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
         ChangeNotification notification = mock(ChangeNotification.class);
         ImmutableList<Edit> editList = createBadEditList();
         when(notification.getEdit()).thenReturn(editList);
index 32ec06a664e30c3e158f9512c07a4eee9b1b15a5..50afef19a96efa8a9e38359f9a342c29ef5f97c2 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.transportpce.networkmodel.listeners;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.anyString;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
@@ -18,33 +18,33 @@ import static org.mockito.Mockito.when;
 
 import java.util.Collection;
 import java.util.HashSet;
 
 import java.util.Collection;
 import java.util.HashSet;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
 import org.opendaylight.transportpce.networkmodel.service.NetworkModelService;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 
 
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
 import org.opendaylight.transportpce.networkmodel.service.NetworkModelService;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
 
 
-@RunWith(MockitoJUnitRunner.class)
+@ExtendWith(MockitoExtension.class)
 public class PortMappingListenerTest {
 
     @Mock
     private NetworkModelService networkModelService;
     private PortMappingListener portMappingListenerSpy;
 
 public class PortMappingListenerTest {
 
     @Mock
     private NetworkModelService networkModelService;
     private PortMappingListener portMappingListenerSpy;
 
-    @Before
-    public void setUp() {
+    @BeforeEach
+    void setUp() {
         portMappingListenerSpy = Mockito.spy(new PortMappingListener(networkModelService));
         portMappingListenerSpy = Mockito.spy(new PortMappingListener(networkModelService));
-        doReturn("NodeID").when(portMappingListenerSpy).getNodeIdFromMappingDataTreeIdentifier(any());
+        lenient().doReturn("NodeID").when(portMappingListenerSpy).getNodeIdFromMappingDataTreeIdentifier(any());
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenMappingOperAndAdminDidntChange() {
+    void testOnDataTreeChangedWhenMappingOperAndAdminDidntChange() {
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
@@ -66,7 +66,7 @@ public class PortMappingListenerTest {
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenMappingAdminChanged() {
+    void testOnDataTreeChangedWhenMappingAdminChanged() {
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
@@ -86,7 +86,7 @@ public class PortMappingListenerTest {
     }
 
     @Test
     }
 
     @Test
-    public void testOnDataTreeChangedWhenMappingOperChanged() {
+    void testOnDataTreeChangedWhenMappingOperChanged() {
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
         final Collection<DataTreeModification<Mapping>> changes = new HashSet<>();
         @SuppressWarnings("unchecked") final DataTreeModification<Mapping> ch = mock(DataTreeModification.class);
         changes.add(ch);
index cf3eb8433c5bdc64c2924d1f012e1467ee2619b7..7df86407cb5fc37db1f3513f4bad9211ee7fbc62 100644 (file)
@@ -8,9 +8,10 @@
 
 package org.opendaylight.transportpce.networkmodel.service;
 
 
 package org.opendaylight.transportpce.networkmodel.service;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 
 import java.io.FileNotFoundException;
 import java.io.FileReader;
@@ -22,9 +23,9 @@ import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.InstanceIdentifiers;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.InstanceIdentifiers;
@@ -46,7 +47,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Ignore
+@Disabled
 public class FrequenciesServiceTest extends AbstractTest {
     private static final Logger LOG = LoggerFactory.getLogger(FrequenciesServiceTest.class);
     private static final String OPENROADM_TOPOLOGY_FILE = "src/test/resources/openroadm-topology.xml";
 public class FrequenciesServiceTest extends AbstractTest {
     private static final Logger LOG = LoggerFactory.getLogger(FrequenciesServiceTest.class);
     private static final String OPENROADM_TOPOLOGY_FILE = "src/test/resources/openroadm-topology.xml";
@@ -56,8 +57,8 @@ public class FrequenciesServiceTest extends AbstractTest {
     private final BitSet usedBits = new BitSet(8);
     private static BitSet availableBits = new BitSet(8);
 
     private final BitSet usedBits = new BitSet(8);
     private static BitSet availableBits = new BitSet(8);
 
-    @BeforeClass
-    public static void setUp() throws InterruptedException, ExecutionException, FileNotFoundException {
+    @BeforeAll
+    static void setUp() throws InterruptedException, ExecutionException, FileNotFoundException {
         availableBits.set(0, 8, true);
         TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(), OPENROADM_TOPOLOGY_FILE,
                 InstanceIdentifiers.OVERLAY_NETWORK_II);
         availableBits.set(0, 8, true);
         TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(), OPENROADM_TOPOLOGY_FILE,
                 InstanceIdentifiers.OVERLAY_NETWORK_II);
@@ -76,41 +77,53 @@ public class FrequenciesServiceTest extends AbstractTest {
     }
 
     @Test
     }
 
     @Test
-    public void allocateFrequenciesTest() throws IOException {
+    void allocateFrequenciesTest() throws IOException {
         FrequenciesService service = new FrequenciesServiceImpl(getDataBroker());
         service.allocateFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         TerminationPoint1 terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-DEG2", "DEG2-CTP-TXRX");
         FrequenciesService service = new FrequenciesServiceImpl(getDataBroker());
         service.allocateFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         TerminationPoint1 terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-DEG2", "DEG2-CTP-TXRX");
-        assertEquals("Lambda 1 should not be available for ctp-attributes",
-                BitSet.valueOf(terminationPoint.getCtpAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),usedBits);
-        assertNull("cp-attributes should be null", terminationPoint.getCpAttributes());
+        assertEquals(
+            BitSet.valueOf(terminationPoint.getCtpAttributes().getAvailFreqMaps().get(availFreqMapKey).getFreqMap())
+                .get(760, 768),
+            usedBits,
+            "Lambda 1 should not be available for ctp-attributes");
+        assertNull(terminationPoint.getCpAttributes(), "cp-attributes should be null");
         terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-SRG1", "SRG1-PP1-TXRX");
         terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-SRG1", "SRG1-PP1-TXRX");
-        assertEquals("Lambda 1 should not be available for pp-attributes",
-                BitSet.valueOf(terminationPoint.getPpAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),usedBits);
+        assertEquals(
+            BitSet.valueOf(terminationPoint.getPpAttributes().getAvailFreqMaps().get(availFreqMapKey).getFreqMap())
+                .get(760, 768),
+            usedBits,
+            "Lambda 1 should not be available for pp-attributes");
         Node1 node = getNetworkNodeFromDatastore("ROADM-A1-SRG1");
         Node1 node = getNetworkNodeFromDatastore("ROADM-A1-SRG1");
-        assertEquals("Lambda 1 should not be available for srg-attributes",
-                BitSet.valueOf(node.getSrgAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),usedBits);
+        assertEquals(
+            BitSet.valueOf(node.getSrgAttributes().getAvailFreqMaps().get(availFreqMapKey).getFreqMap())
+                .get(760, 768),
+            usedBits,
+            "Lambda 1 should not be available for srg-attributes");
     }
 
     @Test
     }
 
     @Test
-    public void releaseFrequenciesTest() throws IOException {
+    void releaseFrequenciesTest() throws IOException {
         FrequenciesService service = new FrequenciesServiceImpl(getDataBroker());
         service.allocateFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         service.releaseFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         TerminationPoint1 terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-DEG2", "DEG2-CTP-TXRX");
         FrequenciesService service = new FrequenciesServiceImpl(getDataBroker());
         service.allocateFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         service.releaseFrequencies(pathDescription.getAToZDirection(), pathDescription.getZToADirection());
         TerminationPoint1 terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-DEG2", "DEG2-CTP-TXRX");
-        assertEquals("Lambda 1 should be available for ctp-attributes",
-                BitSet.valueOf(terminationPoint.getCtpAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),availableBits);
+        assertEquals(
+            BitSet.valueOf(terminationPoint.getCtpAttributes().getAvailFreqMaps().get(availFreqMapKey)
+                .getFreqMap()).get(760, 768),
+            availableBits,
+            "Lambda 1 should be available for ctp-attributes");
         terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-SRG1", "SRG1-PP1-TXRX");
         terminationPoint = getNetworkTerminationPointFromDatastore("ROADM-A1-SRG1", "SRG1-PP1-TXRX");
-        assertEquals("Lambda 1 should be available for pp-attributes",
-                BitSet.valueOf(terminationPoint.getPpAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),availableBits);
+        assertEquals(
+            BitSet.valueOf(terminationPoint.getPpAttributes().getAvailFreqMaps().get(availFreqMapKey)
+                .getFreqMap()).get(760, 768),
+            availableBits,
+            "Lambda 1 should be available for pp-attributes");
         Node1 node = getNetworkNodeFromDatastore("ROADM-A1-SRG1");
         Node1 node = getNetworkNodeFromDatastore("ROADM-A1-SRG1");
-        assertEquals("Lambda 1 should be available for srg-attributes",
-                BitSet.valueOf(node.getSrgAttributes().getAvailFreqMaps().get(availFreqMapKey)
-                .getFreqMap()).get(760, 768),availableBits);
+        assertEquals(
+            BitSet.valueOf(node.getSrgAttributes().getAvailFreqMaps().get(availFreqMapKey)
+                .getFreqMap()).get(760, 768),
+            availableBits,
+            "Lambda 1 should be available for srg-attributes");
     }
 
     private TerminationPoint1 getNetworkTerminationPointFromDatastore(String nodeId, String tpId) {
     }
 
     private TerminationPoint1 getNetworkTerminationPointFromDatastore(String nodeId, String tpId) {
@@ -160,5 +173,4 @@ public class FrequenciesServiceTest extends AbstractTest {
             return null;
         }
     }
             return null;
         }
     }
-
 }
 }
index df1c8d7c18ebd7fc326e8e4a0955e654d6e3a65d..8d6fc3d7c6d16dbeffc12ea57ff36d55bb586a99 100644 (file)
@@ -7,10 +7,11 @@
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
 
 
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import org.junit.jupiter.api.Test;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.OpenroadmNodeVersion;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfo;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfoBuilder;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.OpenroadmNodeVersion;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfo;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfoBuilder;
@@ -26,7 +27,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev
 public class ClliNetworkTest {
 
     @Test
 public class ClliNetworkTest {
 
     @Test
-    public void createNodeTest() {
+    void createNodeTest() {
         //prepare data test
         NodeInfo nodeInfo = computeNodeInfoBuilder().build();
         Node1 clliAugmentation = new Node1Builder()
         //prepare data test
         NodeInfo nodeInfo = computeNodeInfoBuilder().build();
         Node1 clliAugmentation = new Node1Builder()
@@ -35,18 +36,18 @@ public class ClliNetworkTest {
 
         //run test
         Node createdNode = ClliNetwork.createNode("XPDRA01", nodeInfo);
 
         //run test
         Node createdNode = ClliNetwork.createNode("XPDRA01", nodeInfo);
-        assertNull("SupportingNode should be null", createdNode.getSupportingNode());
-        assertEquals("Node key should be equals to NodeClliId ", new NodeKey(new NodeId("NodeClliId")),
-            createdNode.key());
-        assertEquals("Expect org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev191129.Node1 augmentation",
-            clliAugmentation, createdNode.augmentation(Node1.class));
+        assertNull(createdNode.getSupportingNode(), "SupportingNode should be null");
+        assertEquals(new NodeKey(new NodeId("NodeClliId")), createdNode.key(),
+            "Node key should be equals to NodeClliId");
+        assertEquals(clliAugmentation, createdNode.augmentation(Node1.class),
+            "Expect org.opendaylight.yang.gen.v1.http.org.openroadm.clli.network.rev191129.Node1 augmentation");
     }
 
     @Test
     }
 
     @Test
-    public void createNodeWithNullDeviceIdTest() {
+    void createNodeWithNullDeviceIdTest() {
         Node createdNode = ClliNetwork.createNode(null, computeNodeInfoBuilder().build());
         Node createdNode = ClliNetwork.createNode(null, computeNodeInfoBuilder().build());
-        assertNull("SupportingNode should be null", createdNode.getSupportingNode());
-        assertEquals("Node id should be equals to NodeClliId ", new NodeId("NodeClliId"), createdNode.getNodeId());
+        assertNull(createdNode.getSupportingNode(), "SupportingNode should be null");
+        assertEquals(new NodeId("NodeClliId"), createdNode.getNodeId(), "Node id should be equals to NodeClliId");
     }
 
     private NodeInfoBuilder computeNodeInfoBuilder() {
     }
 
     private NodeInfoBuilder computeNodeInfoBuilder() {
index 06492ccd336691fb180b7734a621fd5a9a84d7a4..20a20e89d37ac43587601fb77fb3b7bb9de2c4da 100644 (file)
@@ -8,13 +8,15 @@
 package org.opendaylight.transportpce.networkmodel.util;
 
 
 package org.opendaylight.transportpce.networkmodel.util;
 
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.OpenroadmNodeVersion;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfo;
 import org.opendaylight.transportpce.common.NetworkUtils;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.OpenroadmNodeVersion;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfo;
@@ -32,7 +34,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev
 public class OpenRoadmNetworkTest {
 
     @Test
 public class OpenRoadmNetworkTest {
 
     @Test
-    public void createXpdrNodeTest() {
+    void createXpdrNodeTest() {
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Xpdr, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Xpdr, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
@@ -42,7 +44,7 @@ public class OpenRoadmNetworkTest {
     }
 
     @Test
     }
 
     @Test
-    public void createRdmNodeTest() {
+    void createRdmNodeTest() {
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Rdm, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Rdm, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
@@ -52,23 +54,22 @@ public class OpenRoadmNetworkTest {
     }
 
     @Test
     }
 
     @Test
-    public void createNodeWithBadNodeTypeTest() {
+    void createNodeWithBadNodeTypeTest() {
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Ila, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Ila, "nodeA");
         Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
         assertEquals("XPDRA01", createdNode.getNodeId().getValue());
-        assertNull("NodeType should be ROADM or XPONDER", createdNode.augmentation(Node1.class).getNodeType());
+        assertNull(createdNode.augmentation(Node1.class).getNodeType(), "NodeType should be ROADM or XPONDER");
 
         supportingNodeTest(nodeInfo.getNodeClli(), createdNode);
     }
 
 
         supportingNodeTest(nodeInfo.getNodeClli(), createdNode);
     }
 
-    @Ignore
     @Test
     @Test
-    public void createNodeWithoutClliTest() {
+    void createNodeWithoutClliTest() {
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Xpdr, null);
         NodeInfo nodeInfo = computeNodeInfo(NodeTypes.Xpdr, null);
-        Node createdNode = OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
-        assertEquals("XPDRA01", createdNode.getNodeId().getValue());
-        assertEquals("XPONDER", createdNode.augmentation(Node1.class).getNodeType().getName());
-        assertEquals(0, createdNode.getSupportingNode().size());
+        Exception exception = assertThrows(NullPointerException.class, () -> {
+            OpenRoadmNetwork.createNode("XPDRA01", nodeInfo);
+        });
+        assertTrue("Supplied value may not be null".contains(exception.getMessage()));
     }
 
     private NodeInfo computeNodeInfo(NodeTypes nodeType, String clli) {
     }
 
     private NodeInfo computeNodeInfo(NodeTypes nodeType, String clli) {
index 144aef0d48a27a0bf614c3c75c3f78a5e65b08de..3718002d27bdc5fdc13ec3a0ae98da443baca4ce 100644 (file)
@@ -15,11 +15,11 @@ import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
 import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
 import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 import com.google.gson.stream.JsonReader;
 import java.io.FileReader;
 
 import com.google.gson.stream.JsonReader;
 import java.io.FileReader;
@@ -31,7 +31,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
 import org.opendaylight.transportpce.networkmodel.util.test.JsonUtil;
 import org.opendaylight.transportpce.networkmodel.util.test.NetworkmodelTestUtil;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
 import org.opendaylight.transportpce.networkmodel.util.test.JsonUtil;
 import org.opendaylight.transportpce.networkmodel.util.test.NetworkmodelTestUtil;
@@ -113,116 +113,87 @@ public class OpenRoadmOtnTopologyTest {
     }
 
     @Test
     }
 
     @Test
-    public void createTopologyShardForTpdrTest() {
+    void createTopologyShardForTpdrTest() {
         TopologyShard topologyShard = OpenRoadmOtnTopology.createTopologyShard(this.portMappingTpdr);
         TopologyShard topologyShard = OpenRoadmOtnTopology.createTopologyShard(this.portMappingTpdr);
-        assertNotNull("TopologyShard should never be null", topologyShard);
-        assertEquals("Should contain a single node", 1, topologyShard.getNodes().size());
-        assertEquals("Should contain no link", 0, topologyShard.getLinks().size());
+        assertNotNull(topologyShard, "TopologyShard should never be null");
+        assertEquals(1, topologyShard.getNodes().size(), "Should contain a single node");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain no link");
         Node node = topologyShard.getNodes().get(0);
         assertEquals("XPDR-A1-XPDR1", node.getNodeId().getValue());
         // tests supporting nodes
         List<SupportingNode> supportingNodes = node.nonnullSupportingNode().values().stream()
             .sorted((sn1, sn2) -> sn1.getNetworkRef().getValue().compareTo(sn2.getNetworkRef().getValue()))
             .collect(Collectors.toList());
         Node node = topologyShard.getNodes().get(0);
         assertEquals("XPDR-A1-XPDR1", node.getNodeId().getValue());
         // tests supporting nodes
         List<SupportingNode> supportingNodes = node.nonnullSupportingNode().values().stream()
             .sorted((sn1, sn2) -> sn1.getNetworkRef().getValue().compareTo(sn2.getNetworkRef().getValue()))
             .collect(Collectors.toList());
-        assertEquals("Should contain 3 supporting nodes", 3, supportingNodes.size());
-        assertEquals("clli-network", supportingNodes.get(0).getNetworkRef().getValue());
-        assertEquals("NodeA", supportingNodes.get(0).getNodeRef().getValue());
-        assertEquals("openroadm-network", supportingNodes.get(1).getNetworkRef().getValue());
-        assertEquals("XPDR-A1", supportingNodes.get(1).getNodeRef().getValue());
-        assertEquals("openroadm-topology", supportingNodes.get(2).getNetworkRef().getValue());
-        assertEquals("XPDR-A1-XPDR1", supportingNodes.get(2).getNodeRef().getValue());
+        assertEquals(3, supportingNodes.size(),"Should contain 3 supporting nodes");
+        assertEquals(supportingNodes.get(0).getNetworkRef().getValue(), "clli-network");
+        assertEquals(supportingNodes.get(0).getNodeRef().getValue(), "NodeA");
+        assertEquals(supportingNodes.get(1).getNetworkRef().getValue(), "openroadm-network");
+        assertEquals(supportingNodes.get(1).getNodeRef().getValue(), "XPDR-A1");
+        assertEquals(supportingNodes.get(2).getNetworkRef().getValue(), "openroadm-topology");
+        assertEquals(supportingNodes.get(2).getNodeRef().getValue(), "XPDR-A1-XPDR1");
         assertEquals(OpenroadmNodeType.TPDR, node.augmentation(Node1.class).getNodeType());
         assertEquals(
             Uint16.valueOf(1),
             node.augmentation(
         assertEquals(OpenroadmNodeType.TPDR, node.augmentation(Node1.class).getNodeType());
         assertEquals(
             Uint16.valueOf(1),
             node.augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
-                .getXpdrAttributes()
-                .getXpdrNumber());
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
+                    .getXpdrAttributes().getXpdrNumber());
         //tests list of TPs
         List<TerminationPoint> tps = node.augmentation(
                 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
         //tests list of TPs
         List<TerminationPoint> tps = node.augmentation(
                 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
-            .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
-            .collect(Collectors.toList());
-        assertEquals("node should contain 4 TPs", 4, tps.size());
+                .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
+                .collect(Collectors.toList());
+        assertEquals(4, tps.size(), "node should contain 4 TPs");
         //tests client tp
         assertEquals("XPDR1-CLIENT1", tps.get(0).getTpId().getValue());
         assertEquals(
             "XPDR1-NETWORK1",
         //tests client tp
         assertEquals("XPDR1-CLIENT1", tps.get(0).getTpId().getValue());
         assertEquals(
             "XPDR1-NETWORK1",
-            tps.get(0)
-                    .augmentation(TerminationPoint1.class)
-                    .getAssociatedConnectionMapTp()
-                    .iterator()
-                    .next()
-                    .getValue());
+            tps.get(0).augmentation(
+                        TerminationPoint1.class).getAssociatedConnectionMapTp().iterator().next().getValue());
         assertEquals(
         assertEquals(
-            "only If100GE interface capabitily expected",
             1,
             1,
-            tps.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+            tps.get(0).augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                         .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability()
-                .size());
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().size(),
+            "only If100GE interface capabitily expected");
         assertEquals(
             If100GE.VALUE,
         assertEquals(
             If100GE.VALUE,
-            tps.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+            tps.get(0).augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                         .TerminationPoint1.class)
-                .getTpSupportedInterfaces().nonnullSupportedInterfaceCapability()
-                .values().stream().findFirst()
-                .get().getIfCapType());
-        assertEquals(
-            "first TP must be of type client",
-            OpenroadmTpType.XPONDERCLIENT,
-            tps.get(0).augmentation(TerminationPoint1.class).getTpType());
+                    .getTpSupportedInterfaces().nonnullSupportedInterfaceCapability().values().stream().findFirst()
+                        .get().getIfCapType());
+        assertEquals(OpenroadmTpType.XPONDERCLIENT,tps.get(0).augmentation(TerminationPoint1.class).getTpType(),
+            "first TP must be of type client");
         //tests network tp
         assertEquals("XPDR1-NETWORK1", tps.get(2).getTpId().getValue());
         //tests network tp
         assertEquals("XPDR1-NETWORK1", tps.get(2).getTpId().getValue());
+        assertEquals("XPDR1-CLIENT1", tps.get(2).augmentation(TerminationPoint1.class)
+                    .getAssociatedConnectionMapTp().iterator().next().getValue());
         assertEquals(
         assertEquals(
-            "XPDR1-CLIENT1",
-            tps.get(2).augmentation(TerminationPoint1.class)
-                    .getAssociatedConnectionMapTp()
-                    .iterator()
-                    .next()
-                    .getValue());
-        assertEquals(
-            "only IfOCH interface capabitily expected",
             1,
             1,
-            tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+            tps.get(2).augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                         .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability()
-                .size());
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().size());
         assertEquals(
             IfOCH.VALUE,
         assertEquals(
             IfOCH.VALUE,
-            tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+            tps.get(2).augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                         .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability()
-                .values().stream().findFirst()
-                .get()
-                .getIfCapType());
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream().findFirst().get()
+                        .getIfCapType());
         assertNull(
         assertNull(
-            "the rate should be null",
-            tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                        .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getRate());
-        assertEquals(
-            "third TP must be of type network",
-            OpenroadmTpType.XPONDERNETWORK,
-            tps.get(2).augmentation(TerminationPoint1.class).getTpType());
+            tps.get(2).augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+                    .TerminationPoint1.class)
+                .getXpdrTpPortConnectionAttributes().getRate(),
+            "the rate should be null");
+        assertEquals(OpenroadmTpType.XPONDERNETWORK,tps.get(2).augmentation(TerminationPoint1.class).getTpType(),
+            "third TP must be of type network");
     }
 
     @Test
     }
 
     @Test
-    public void createTopologyShardForSpdrTest() {
+    void createTopologyShardForSpdrTest() {
         TopologyShard topologyShard = OpenRoadmOtnTopology.createTopologyShard(this.portMappingSpdr);
         TopologyShard topologyShard = OpenRoadmOtnTopology.createTopologyShard(this.portMappingSpdr);
-        assertNotNull("TopologyShard should never be null", topologyShard);
-        assertEquals("Should contain two nodes", 2, topologyShard.getNodes().size());
-        assertEquals("Should contain no link", 0, topologyShard.getLinks().size());
+        assertNotNull(topologyShard, "TopologyShard should never be null");
+        assertEquals(2, topologyShard.getNodes().size(), "Should contain two nodes");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain no link");
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
@@ -232,90 +203,88 @@ public class OpenRoadmOtnTopologyTest {
     }
 
     @Test
     }
 
     @Test
-    public void createOtnLinksForOTU4NormalTest() {
+    void createOtnLinksForOTU4NormalTest() {
         String nodeA = "SPDRA";
         String tpA = "XPDR1-NETWORK1";
         String nodeZ = "SPDRZ";
         String tpZ = "XPDR1-NETWORK1";
         List<Link> links = OpenRoadmOtnTopology.createOtnLinks(nodeA, tpA, nodeZ, tpZ, OtnLinkType.OTU4).getLinks();
         String nodeA = "SPDRA";
         String tpA = "XPDR1-NETWORK1";
         String nodeZ = "SPDRZ";
         String tpZ = "XPDR1-NETWORK1";
         List<Link> links = OpenRoadmOtnTopology.createOtnLinks(nodeA, tpA, nodeZ, tpZ, OtnLinkType.OTU4).getLinks();
-        assertEquals("2 OTU4 links should have been created", 2, links.size());
+        assertEquals(2, links.size(), "2 OTU4 links should have been created");
         List<Link> sortedLinks = links.stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals(
         List<Link> sortedLinks = links.stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals(
-            "name of OTU4 linkid AZ",
             "OTU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
             "OTU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
-            sortedLinks.get(0).getLinkId().getValue());
+            sortedLinks.get(0).getLinkId().getValue(),
+            "name of OTU4 linkid AZ");
         assertEquals(
         assertEquals(
-            "name of OTU4 linkid ZA",
             "OTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             "OTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
-            sortedLinks.get(1).getLinkId().getValue());
+            sortedLinks.get(1).getLinkId().getValue(),
+            "name of OTU4 linkid ZA");
         assertEquals("SPDRA-XPDR1", sortedLinks.get(0).getSource().getSourceNode().getValue());
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(0).getDestination().getDestNode().getValue());
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(1).getSource().getSourceNode().getValue());
         assertEquals("SPDRA-XPDR1", sortedLinks.get(1).getDestination().getDestNode().getValue());
         assertEquals(
         assertEquals("SPDRA-XPDR1", sortedLinks.get(0).getSource().getSourceNode().getValue());
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(0).getDestination().getDestNode().getValue());
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(1).getSource().getSourceNode().getValue());
         assertEquals("SPDRA-XPDR1", sortedLinks.get(1).getDestination().getDestNode().getValue());
         assertEquals(
-            "available BW at OTU4 creation should be 100G (100000)",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "available BW at OTU4 creation should be 100G (100000)");
         assertEquals(
         assertEquals(
-            "used BW at OTU4 creation should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "used BW at OTU4 creation should be 0");
         assertEquals(
             OpenroadmLinkType.OTNLINK,
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
         assertEquals(
             OpenroadmLinkType.OTNLINK,
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
-            "opposite link must be present",
             "OTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
             "OTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
-                .getOppositeLink()
-                .getValue());
+                .getOppositeLink().getValue(),
+            "opposite link must be present");
         assertEquals(
         assertEquals(
-            "otn link type should be OTU4",
             OtnLinkType.OTU4,
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.Link1.class)
             OtnLinkType.OTU4,
             sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.Link1.class)
-                .getOtnLinkType());
+                .getOtnLinkType(),
+            "otn link type should be OTU4");
     }
 
     @Test
     }
 
     @Test
-    public void createOtnLinksForNotManagedOtnlinktypeTest() {
+    void createOtnLinksForNotManagedOtnlinktypeTest() {
         String nodeA = "SPDRA";
         String tpA = "XPDR1-NETWORK1";
         String nodeZ = "SPDRZ";
         String tpZ = "XPDR1-NETWORK1";
         TopologyShard topoShard = OpenRoadmOtnTopology.createOtnLinks(nodeA, tpA, nodeZ, tpZ, OtnLinkType.ODU0);
         String nodeA = "SPDRA";
         String tpA = "XPDR1-NETWORK1";
         String nodeZ = "SPDRZ";
         String tpZ = "XPDR1-NETWORK1";
         TopologyShard topoShard = OpenRoadmOtnTopology.createOtnLinks(nodeA, tpA, nodeZ, tpZ, OtnLinkType.ODU0);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("TopologyShard should not contain any node", topoShard.getNodes());
-        assertNull("TopologyShard should not contain any link", topoShard.getLinks());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "TopologyShard should not contain any node");
+        assertNull(topoShard.getLinks(), "TopologyShard should not contain any link");
     }
 
     @Test
     }
 
     @Test
-    public void createOtnLinksForODU4NormalTest() {
+    void createOtnLinksForODU4NormalTest() {
         TopologyShard topoShard = OpenRoadmOtnTopology
             .createOtnLinks(
                 NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000)),
                 NetworkmodelTestUtil.createTpList(false), OtnLinkType.ODTU4);
         TopologyShard topoShard = OpenRoadmOtnTopology
             .createOtnLinks(
                 NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000)),
                 NetworkmodelTestUtil.createTpList(false), OtnLinkType.ODTU4);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("list of links should contain 4 links", 4, sortedLinks.size());
-        assertTrue("link 3 should be of type OTU4", sortedLinks.get(2).getLinkId().getValue().startsWith("OTU4-"));
+        assertEquals(4, sortedLinks.size(), "list of links should contain 4 links");
+        assertTrue(sortedLinks.get(2).getLinkId().getValue().startsWith("OTU4-"), "link 3 should be of type OTU4");
         assertEquals(
         assertEquals(
-            "after odu4 creation, available BW of supported OTU4 should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            sortedLinks.get(2).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(2).augmentation(Link1.class).getAvailableBandwidth(),
+            "after odu4 creation, available BW of supported OTU4 should be 0");
         assertEquals(
         assertEquals(
-            "after odu4 creation, used BW of supported OTU4 should be 100 000",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            sortedLinks.get(2).augmentation(Link1.class).getUsedBandwidth());
-
+            sortedLinks.get(2).augmentation(Link1.class).getUsedBandwidth(),
+            "after odu4 creation, used BW of supported OTU4 should be 100 000");
         assertEquals(
             "ODTU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).getLinkId().getValue());
         assertEquals(
             "ODTU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).getLinkId().getValue());
@@ -327,435 +296,358 @@ public class OpenRoadmOtnTopologyTest {
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(1).getSource().getSourceNode().getValue());
         assertEquals("SPDRA-XPDR1", sortedLinks.get(1).getDestination().getDestNode().getValue());
         assertEquals(
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(1).getSource().getSourceNode().getValue());
         assertEquals("SPDRA-XPDR1", sortedLinks.get(1).getDestination().getDestNode().getValue());
         assertEquals(
-            "after odu4 creation, its available BW should be 100 000",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after odu4 creation, its available BW should be 100 000");
         assertEquals(
         assertEquals(
-            "after odu4 creation, its used BW should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after odu4 creation, its used BW should be 0");
         assertEquals(
             OpenroadmLinkType.OTNLINK,
         assertEquals(
             OpenroadmLinkType.OTNLINK,
-            sortedLinks.get(0)
-                .augmentation(
+            sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
-            "opposite link must be present",
             "ODTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             "ODTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
-            sortedLinks.get(0)
-                .augmentation(
+            sortedLinks.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
-                .getOppositeLink()
-                .getValue());
+                .getOppositeLink().getValue(),
+            "opposite link must be present");
         assertEquals(
         assertEquals(
-            "otn link type should be ODTU4",
             OtnLinkType.ODTU4,
             OtnLinkType.ODTU4,
-            sortedLinks.get(0)
-                .augmentation(org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630
-                        .Link1.class)
-                .getOtnLinkType());
+            sortedLinks.get(0).augmentation(
+                    org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.Link1.class)
+                .getOtnLinkType(),
+            "otn link type should be ODTU4");
 
 
-        assertEquals("list of TPs should contain 2 updated TPs", 2, topoShard.getTps().size());
+        assertEquals(2, topoShard.getTps().size(), "list of TPs should contain 2 updated TPs");
         assertNotNull(
         assertNotNull(
-            "after ODU4 creation, its termination point should contain a TsPool list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool());
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
+            "after ODU4 creation, its termination point should contain a TsPool list");
         assertEquals(
         assertEquals(
-            "Ts pool list should be full, with 80 trib slots",
             80,
             80,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getTsPool().size(),
+            "Ts pool list should be full, with 80 trib slots");
         assertNotNull(
         assertNotNull(
-            "after ODU4 creation, its termination point should contain a TpnPool list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool(),
+            "after ODU4 creation, its termination point should contain a TpnPool list");
         assertEquals(
         assertEquals(
-            "Tpn pool list should be full, with 80 trib ports",
             80,
             80,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool()
+                .size(),
+            "Tpn pool list should be full, with 80 trib ports");
     }
 
     @Test
     }
 
     @Test
-    public void createOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
+    void createOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
         List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
         List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.createOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(false),
+        TopologyShard topoShard = OpenRoadmOtnTopology.createOtnLinks(
+                otu4LinksWithBadBWParam,
+                NetworkmodelTestUtil.createTpList(false),
                 OtnLinkType.OTU4);
                 OtnLinkType.OTU4);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
-        assertNull("list of links should be null", topoShard.getLinks());
-        assertNull("list of tps should be null", topoShard.getTps());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
+        assertNull(topoShard.getLinks(), "list of links should be null");
+        assertNull(topoShard.getTps(), "list of tps should be null");
 
         otu4LinksWithBadBWParam.clear();
 
         otu4LinksWithBadBWParam.clear();
-        topoShard =
-            OpenRoadmOtnTopology.createOtnLinks(
-                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(99000)),
-                    NetworkmodelTestUtil.createTpList(false), OtnLinkType.OTU4);
-        assertNull("list of nodes should be null", topoShard.getNodes());
-        assertNull("list of links should be null", topoShard.getLinks());
-        assertNull("list of tps should be null", topoShard.getTps());
+        topoShard = OpenRoadmOtnTopology.createOtnLinks(
+                NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(99000)),
+                NetworkmodelTestUtil.createTpList(false),
+                OtnLinkType.OTU4);
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
+        assertNull(topoShard.getLinks(), "list of links should be null");
+        assertNull(topoShard.getTps(), "list of tps should be null");
     }
 
     @Test
     }
 
     @Test
-    public void deleteOtnLinksForODU4NormalTest() {
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.deleteOtnLinks(
+    void deleteOtnLinksForODU4NormalTest() {
+        TopologyShard topoShard = OpenRoadmOtnTopology.deleteOtnLinks(
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0)),
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0)),
-                    NetworkmodelTestUtil.createTpList(true), OtnLinkType.OTU4);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertEquals("list of links should contain 2 links", 2, topoShard.getLinks().size());
+                    NetworkmodelTestUtil.createTpList(true),
+                    OtnLinkType.OTU4);
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertEquals(2, topoShard.getLinks().size(), "list of links should contain 2 links");
         assertEquals(
         assertEquals(
-            "after ODU4 deletion, available BW of supported OTU4 should be 100 000",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            topoShard.getLinks().get(0).augmentation(Link1.class).getAvailableBandwidth());
+            topoShard.getLinks().get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after ODU4 deletion, available BW of supported OTU4 should be 100 000");
         assertEquals(
         assertEquals(
-            "after ODU4 deletion, used BW of supported OTU4 should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            topoShard.getLinks().get(0).augmentation(Link1.class).getUsedBandwidth());
+            topoShard.getLinks().get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after ODU4 deletion, used BW of supported OTU4 should be 0");
 
 
-        assertEquals("list of TPs should contain 2 updated TPs", 2, topoShard.getTps().size());
+        assertEquals(2, topoShard.getTps().size(), "list of TPs should contain 2 updated TPs");
         assertNull(
         assertNull(
-            "after ODU4 deletion, its termination points should not contain any TsPool list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool());
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
+            "after ODU4 deletion, its termination points should not contain any TsPool list");
         assertNull(
         assertNull(
-            "after ODU4 deletion, its termination points should not contain any TpnPool list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool(),
+            "after ODU4 deletion, its termination points should not contain any TpnPool list");
     }
 
     @Test
     }
 
     @Test
-    public void deleteOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
+    void deleteOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
         List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
         List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.deleteOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(true),
+        TopologyShard topoShard = OpenRoadmOtnTopology.deleteOtnLinks(
+                otu4LinksWithBadBWParam,
+                NetworkmodelTestUtil.createTpList(true),
                 OtnLinkType.OTU4);
                 OtnLinkType.OTU4);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
-        assertNull("list of links should be null", topoShard.getLinks());
-        assertNull("list of tps should be null", topoShard.getTps());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
+        assertNull(topoShard.getLinks(), "list of links should be null");
+        assertNull(topoShard.getTps(), "list of tps should be null");
     }
 
     @Test
     }
 
     @Test
-    public void updateOtnLinksFor10GTest() {
+    void updateOtnLinksFor10GTest() {
         // tests update for 10G creation
         // tests update for 10G creation
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.updateOtnLinks(
+        TopologyShard topoShard = OpenRoadmOtnTopology.updateOtnLinks(
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(10), (short)1, (short)1, (short)8, false);
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(10), (short)1, (short)1, (short)8, false);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
+        assertEquals(2, sortedLinks.size(), "list of links should contain 2 links");
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
-            "after 10G creation, available BW of supported ODU4 should be 90000",
             Uint32.valueOf(90000),
             Uint32.valueOf(90000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after 10G creation, available BW of supported ODU4 should be 90000");
         assertEquals(
         assertEquals(
-            "after 10G creation, used BW of supported ODU4 should be 10000",
             Uint32.valueOf(10000),
             Uint32.valueOf(10000),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after 10G creation, used BW of supported ODU4 should be 10000");
 
         assertEquals(
 
         assertEquals(
-            "after 10G creation, 8 (over 80) trib slot should be occupied",
             72,
             72,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getTsPool().size(),
+            "after 10G creation, 8 (over 80) trib slot should be occupied");
         assertThat(
             "trib slot 1-8 should no longer be present in Trib slot list",
         assertThat(
             "trib slot 1-8 should no longer be present in Trib slot list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool(),
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
             not(hasItems(Uint16.valueOf(1), Uint16.valueOf(8))));
         assertThat(
             "trib slot 9 should always be present in trib slot list",
             not(hasItems(Uint16.valueOf(1), Uint16.valueOf(8))));
         assertThat(
             "trib slot 9 should always be present in trib slot list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool(),
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItem(Uint16.valueOf(9)));
         assertEquals(
             hasItem(Uint16.valueOf(9)));
         assertEquals(
-            "after 10G creation, 1 (over 80) trib port should be occupied",
             79,
             79,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool()
+                .size(),
+            "after 10G creation, 1 (over 80) trib port should be occupied");
         assertThat(
             "trib port 1 should no longer be present",
         assertThat(
             "trib port 1 should no longer be present",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool(),
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool(),
             not(hasItem(Uint16.valueOf(1))));
 
         // tests update for 10G deletion
         sortedLinks.clear();
         topoShard = OpenRoadmOtnTopology.updateOtnLinks(topoShard.getLinks(), topoShard.getTps(), Uint32.valueOf(10),
             not(hasItem(Uint16.valueOf(1))));
 
         // tests update for 10G deletion
         sortedLinks.clear();
         topoShard = OpenRoadmOtnTopology.updateOtnLinks(topoShard.getLinks(), topoShard.getTps(), Uint32.valueOf(10),
-            (short)1, (short)1, (short)8, true);
+                (short)1, (short)1, (short)8, true);
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
+        assertEquals(2, sortedLinks.size(), "list of links should contain 2 links");
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
-            "after 10G deletion, available BW of supported ODU4 should be 100 000",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after 10G deletion, available BW of supported ODU4 should be 100 000");
         assertEquals(
         assertEquals(
-            "after 10G deletion, used BW of supported ODU4 should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after 10G deletion, used BW of supported ODU4 should be 0");
 
         assertEquals(
 
         assertEquals(
-            "after 10G deletion, trib slot list should be full",
             80,
             80,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getTsPool().size(),
+            "after 10G deletion, trib slot list should be full");
         assertThat(
             "after 10G deletion, trib slot list should contain items 1-8",
         assertThat(
             "after 10G deletion, trib slot list should contain items 1-8",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool(),
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItems(Uint16.valueOf(1), Uint16.valueOf(8), Uint16.valueOf(9)));
         assertEquals(
             hasItems(Uint16.valueOf(1), Uint16.valueOf(8), Uint16.valueOf(9)));
         assertEquals(
-            "after 10G deletion, trib port list should be full",
                 80,
                 80,
-                topoShard.getTps().get(0)
-                    .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                        .TerminationPoint1.class)
-                    .getXpdrTpPortConnectionAttributes()
-                    .getOdtuTpnPool().values().stream().findFirst()
-                    .get()
-                    .getTpnPool()
-                    .size());
+                topoShard.getTps().get(0).augmentation(
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
+                            .TerminationPoint1.class)
+                    .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get()
+                    .getTpnPool().size(),
+                "after 10G deletion, trib port list should be full");
         assertThat(
             "after 10G deletion, trib port list should contain items 1",
         assertThat(
             "after 10G deletion, trib port list should contain items 1",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool(),
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool(),
             hasItem(Uint16.valueOf(1)));
     }
 
     @Test
             hasItem(Uint16.valueOf(1)));
     }
 
     @Test
-    public void updateOtnLinksFor1GCreationTest() {
+    void updateOtnLinksFor1GCreationTest() {
         // tests update for 1G creation
         // tests update for 1G creation
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.updateOtnLinks(
+        TopologyShard topoShard = OpenRoadmOtnTopology.updateOtnLinks(
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(1), (short)1, (short)1, (short)1, false);
                     NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(1), (short)1, (short)1, (short)1, false);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
+        assertEquals(2, sortedLinks.size(), "list of links should contain 2 links");
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
-            "after 1G creation, available BW of supported ODU4 should be 99000",
             Uint32.valueOf(99000),
             Uint32.valueOf(99000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after 1G creation, available BW of supported ODU4 should be 99000");
         assertEquals(
         assertEquals(
-            "after 1G creation, used BW of supported ODU4 should be 1000",
             Uint32.valueOf(1000),
             Uint32.valueOf(1000),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after 1G creation, used BW of supported ODU4 should be 1000");
 
         assertEquals(
 
         assertEquals(
-            "after 1G creation, 1 (over 80) trib slot should be occupied",
             79,
             79,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getTsPool().size(),
+            "after 1G creation, 1 (over 80) trib slot should be occupied");
         assertThat(
             "trib slot 1 should no longer be present in Trib slot list",
         assertThat(
             "trib slot 1 should no longer be present in Trib slot list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool(),
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
             not(hasItem(Uint16.valueOf(1))));
         assertThat(
             "trib slot 2 should always be present in Trib slot list",
             not(hasItem(Uint16.valueOf(1))));
         assertThat(
             "trib slot 2 should always be present in Trib slot list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItem(Uint16.valueOf(2)));
         assertEquals(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItem(Uint16.valueOf(2)));
         assertEquals(
-            "after 1G creation, 1 (over 80) trib port should be occupied",
             79,
             79,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool()
+                .size(),
+            "after 1G creation, 1 (over 80) trib port should be occupied");
         assertThat(
             "trib port 1 should no longer be present in Trib port list",
         assertThat(
             "trib port 1 should no longer be present in Trib port list",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool(),
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool(),
             not(hasItem(Uint16.valueOf(1))));
 
         // tests update for 1G deletion
         sortedLinks.clear();
             not(hasItem(Uint16.valueOf(1))));
 
         // tests update for 1G deletion
         sortedLinks.clear();
-        topoShard =
-            OpenRoadmOtnTopology.updateOtnLinks(
+        topoShard = OpenRoadmOtnTopology.updateOtnLinks(
                     topoShard.getLinks(),
                     topoShard.getTps(),
                     Uint32.valueOf(1), (short)1, (short)1, (short)1, true);
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
                     topoShard.getLinks(),
                     topoShard.getTps(),
                     Uint32.valueOf(1), (short)1, (short)1, (short)1, true);
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
+        assertEquals(2, sortedLinks.size(), "list of links should contain 2 links");
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
         assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
-            "after 1G deletion, available BW of supported ODU4 should be 100 000",
             Uint32.valueOf(100000),
             Uint32.valueOf(100000),
-            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getAvailableBandwidth(),
+            "after 1G deletion, available BW of supported ODU4 should be 100 000");
         assertEquals(
         assertEquals(
-            "after 1G deletion, used BW of supported ODU4 should be 0",
             Uint32.valueOf(0),
             Uint32.valueOf(0),
-            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth());
+            sortedLinks.get(0).augmentation(Link1.class).getUsedBandwidth(),
+            "after 1G deletion, used BW of supported ODU4 should be 0");
 
         assertEquals(
 
         assertEquals(
-            "after 1G deletion, trib slot list should be full",
             80,
             80,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getTsPool().size(),
+            "after 1G deletion, trib slot list should be full");
         assertThat(
             "after 1G deletion, trib slot list should contain items 1 and 2",
         assertThat(
             "after 1G deletion, trib slot list should contain items 1 and 2",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                    .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getTsPool(),
+                        .TerminationPoint1.class)
+                .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItems(Uint16.valueOf(1), Uint16.valueOf(2)));
         assertEquals(
             hasItems(Uint16.valueOf(1), Uint16.valueOf(2)));
         assertEquals(
-            "after 1G deletion, trib port list should be full",
             80,
             80,
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool()
-                .size());
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool()
+                .size(),
+            "after 1G deletion, trib port list should be full");
         assertThat(
             "after 1G deletion, trib port list should contain items 1",
         assertThat(
             "after 1G deletion, trib port list should contain items 1",
-            topoShard.getTps().get(0)
-                .augmentation(
+            topoShard.getTps().get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getOdtuTpnPool().values().stream().findFirst()
-                .get()
-                .getTpnPool(),
+                .getXpdrTpPortConnectionAttributes().getOdtuTpnPool().values().stream().findFirst().get().getTpnPool(),
             hasItem(Uint16.valueOf(1)));
     }
 
     @Test
             hasItem(Uint16.valueOf(1)));
     }
 
     @Test
-    public void updateOtnLinksForODU4WhenBWParamsNotPresentTest() {
+    void updateOtnLinksForODU4WhenBWParamsNotPresentTest() {
         List<Link> odu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000));
         List<Link> odu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : odu4Links) {
         List<Link> odu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000));
         List<Link> odu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : odu4Links) {
@@ -766,30 +658,30 @@ public class OpenRoadmOtnTopologyTest {
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(1), (short)1, (short)1, (short)10, false);
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(1), (short)1, (short)1, (short)10, false);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
-        assertNull("list of links should be null", topoShard.getLinks());
-        assertNull("list of tps should be null", topoShard.getTps());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
+        assertNull(topoShard.getLinks(), "list of links should be null");
+        assertNull(topoShard.getTps(), "list of tps should be null");
     }
 
     @Test
     }
 
     @Test
-    public void updateOtnLinksForODU4WhenAvailBWNotSufficientTest() {
-        List<Link> odu4LinksWithBadBWParam = NetworkmodelTestUtil
-            .createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(8000));
-        TopologyShard topoShard =
-            OpenRoadmOtnTopology.updateOtnLinks(
+    void updateOtnLinksForODU4WhenAvailBWNotSufficientTest() {
+        List<Link> odu4LinksWithBadBWParam = NetworkmodelTestUtil.createSuppOTNLinks(
+                OtnLinkType.ODTU4,
+                Uint32.valueOf(8000));
+        TopologyShard topoShard = OpenRoadmOtnTopology.updateOtnLinks(
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(10), (short)1, (short)1, (short)10, false);
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
                     Uint32.valueOf(10), (short)1, (short)1, (short)10, false);
-        assertNotNull("TopologyShard should never be null", topoShard);
-        assertNull("list of nodes should be null", topoShard.getNodes());
-        assertNull("list of links should be null", topoShard.getLinks());
-        assertNull("list of tps should be null", topoShard.getTps());
+        assertNotNull(topoShard, "TopologyShard should never be null");
+        assertNull(topoShard.getNodes(), "list of nodes should be null");
+        assertNull(topoShard.getLinks(), "list of links should be null");
+        assertNull(topoShard.getTps(), "list of tps should be null");
     }
 
     private void checkSpdrNode(Node node) {
     }
 
     private void checkSpdrNode(Node node) {
-        Uint16 xpdrNb = node
-            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
+        Uint16 xpdrNb = node.augmentation(
+                org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
             .getXpdrAttributes().getXpdrNumber();
         assertEquals("SPDR-SA1-XPDR" + xpdrNb, node.getNodeId().getValue());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
             .getXpdrAttributes().getXpdrNumber();
         assertEquals("SPDR-SA1-XPDR" + xpdrNb, node.getNodeId().getValue());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
@@ -801,7 +693,7 @@ public class OpenRoadmOtnTopologyTest {
         List<SupportingNode> supportingNodes = node.nonnullSupportingNode().values().stream()
             .sorted((sn1, sn2) -> sn1.getNetworkRef().getValue().compareTo(sn2.getNetworkRef().getValue()))
             .collect(Collectors.toList());
         List<SupportingNode> supportingNodes = node.nonnullSupportingNode().values().stream()
             .sorted((sn1, sn2) -> sn1.getNetworkRef().getValue().compareTo(sn2.getNetworkRef().getValue()))
             .collect(Collectors.toList());
-        assertEquals("Should contain 3 supporting nodes", 3, supportingNodes.size());
+        assertEquals(3, supportingNodes.size(), "Should contain 3 supporting nodes");
         assertEquals("clli-network", supportingNodes.get(0).getNetworkRef().getValue());
         assertEquals("NodeSA", supportingNodes.get(0).getNodeRef().getValue());
         assertEquals("openroadm-network", supportingNodes.get(1).getNetworkRef().getValue());
         assertEquals("clli-network", supportingNodes.get(0).getNetworkRef().getValue());
         assertEquals("NodeSA", supportingNodes.get(0).getNodeRef().getValue());
         assertEquals("openroadm-network", supportingNodes.get(1).getNetworkRef().getValue());
@@ -824,36 +716,31 @@ public class OpenRoadmOtnTopologyTest {
     private void checkSpdrSwitchingPools(Uint16 xpdrNb, SwitchingPools sp) {
         List<OduSwitchingPools> oduSwitchingPools = new ArrayList<>(sp.nonnullOduSwitchingPools().values());
         assertEquals(
     private void checkSpdrSwitchingPools(Uint16 xpdrNb, SwitchingPools sp) {
         List<OduSwitchingPools> oduSwitchingPools = new ArrayList<>(sp.nonnullOduSwitchingPools().values());
         assertEquals(
-            "switching-pools augmentation should contain a single odu-switching-pools",
             1,
             1,
-            oduSwitchingPools.size());
+            oduSwitchingPools.size(),
+            "switching-pools augmentation should contain a single odu-switching-pools");
         assertEquals(
         assertEquals(
-            "switching-pool-number should be 1",
             Uint16.valueOf(1),
             Uint16.valueOf(1),
-            oduSwitchingPools.get(0).getSwitchingPoolNumber());
+            oduSwitchingPools.get(0).getSwitchingPoolNumber(),
+            "switching-pool-number should be 1");
         assertEquals(
         assertEquals(
-            "switching-pool-type should be non-blocking",
             "non-blocking",
             "non-blocking",
-            oduSwitchingPools.get(0).getSwitchingPoolType().getName());
+            oduSwitchingPools.get(0).getSwitchingPoolType().getName(),
+            "switching-pool-type should be non-blocking");
 
         List<NonBlockingList> nonBlockingList =
                 new ArrayList<>(oduSwitchingPools.get(0).nonnullNonBlockingList().values());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
 
         List<NonBlockingList> nonBlockingList =
                 new ArrayList<>(oduSwitchingPools.get(0).nonnullNonBlockingList().values());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
-            assertEquals(
-                "Mux should contain 4 non blocking list",
-                4,
-                nonBlockingList.size());
-            assertEquals(
-                Uint16.valueOf(1),
-                nonBlockingList.get(0).getNblNumber());
+            assertEquals(4, nonBlockingList.size(), "Mux should contain 4 non blocking list");
+            assertEquals(Uint16.valueOf(1), nonBlockingList.get(0).getNblNumber());
             List<NonBlockingList> nblList = oduSwitchingPools.get(0).nonnullNonBlockingList().values().stream()
                 .sorted((nbl1, nbl2) -> nbl1.getNblNumber().compareTo(nbl2.getNblNumber()))
                 .collect(Collectors.toList());
             for (NonBlockingList nbl : nblList) {
                 assertEquals(
             List<NonBlockingList> nblList = oduSwitchingPools.get(0).nonnullNonBlockingList().values().stream()
                 .sorted((nbl1, nbl2) -> nbl1.getNblNumber().compareTo(nbl2.getNblNumber()))
                 .collect(Collectors.toList());
             for (NonBlockingList nbl : nblList) {
                 assertEquals(
-                    "for a 10G mux, interconnect BW should be 10G",
                     Uint32.valueOf(10),
                     Uint32.valueOf(10),
-                    nbl.getAvailableInterconnectBandwidth());
+                    nbl.getAvailableInterconnectBandwidth(),
+                    "for a 10G mux, interconnect BW should be 10G");
                 assertEquals(Uint32.valueOf(1000000000), nbl.getInterconnectBandwidthUnit());
                 assertThat(
                     "for a 10G mux, non blocking list should contain 2 entries (client + network ports)",
                 assertEquals(Uint32.valueOf(1000000000), nbl.getInterconnectBandwidthUnit());
                 assertThat(
                     "for a 10G mux, non blocking list should contain 2 entries (client + network ports)",
@@ -862,17 +749,11 @@ public class OpenRoadmOtnTopologyTest {
                 String nb = nbl.getNblNumber().toString();
                 assertThat(
                     nbl.getTpList(),
                 String nb = nbl.getNblNumber().toString();
                 assertThat(
                     nbl.getTpList(),
-                    containsInAnyOrder(new TpId("XPDR1-NETWORK1"),
-                        new TpId("XPDR1-CLIENT" + nb)));
+                    containsInAnyOrder(new TpId("XPDR1-NETWORK1"), new TpId("XPDR1-CLIENT" + nb)));
             }
         } else if (xpdrNb.equals(Uint16.valueOf(2))) {
             }
         } else if (xpdrNb.equals(Uint16.valueOf(2))) {
-            assertEquals(
-                "Switch should contain a single non blocking list",
-                1,
-                nonBlockingList.size());
-            assertEquals(
-                Uint16.valueOf(1),
-                nonBlockingList.get(0).getNblNumber());
+            assertEquals(1, nonBlockingList.size(), "Switch should contain a single non blocking list");
+            assertEquals(Uint16.valueOf(1), nonBlockingList.get(0).getNblNumber());
             assertThat(
                 "for a 100G Switch, non blocking list should contain 8 entries (4 clients + 4 network ports)",
                 nonBlockingList.get(0).getTpList(),
             assertThat(
                 "for a 100G Switch, non blocking list should contain 8 entries (4 clients + 4 network ports)",
                 nonBlockingList.get(0).getTpList(),
@@ -889,146 +770,128 @@ public class OpenRoadmOtnTopologyTest {
     private void checkSpdrTpList(Uint16 xpdrNb, List<TerminationPoint> tpList) {
         LOG.info("tpList = {}", tpList);
         assertEquals(
     private void checkSpdrTpList(Uint16 xpdrNb, List<TerminationPoint> tpList) {
         LOG.info("tpList = {}", tpList);
         assertEquals(
-            "only IfOCHOTU4ODU4 interface capabitily expected",
             IfOCHOTU4ODU4.VALUE,
             IfOCHOTU4ODU4.VALUE,
-            tpList.get(4)
-                .augmentation(
+            tpList.get(4).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability().values().stream().findFirst()
-                .get()
-                .getIfCapType());
+                .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream().findFirst().get()
+                .getIfCapType(),
+            "only IfOCHOTU4ODU4 interface capabitily expected");
         assertEquals(
         assertEquals(
-            "the rate should be ODU4",
             ODU4.VALUE,
             ODU4.VALUE,
-            tpList.get(4)
-                .augmentation(
+            tpList.get(4).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
-                .getXpdrTpPortConnectionAttributes()
-                .getRate());
+                .getXpdrTpPortConnectionAttributes().getRate(),
+            "the rate should be ODU4");
         assertEquals(
             "openroadm-topology",
         assertEquals(
             "openroadm-topology",
-            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst()
-            .get().getNetworkRef().getValue());
+            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst().get().getNetworkRef()
+                .getValue());
         assertEquals(
             "SPDR-SA1-XPDR" + xpdrNb,
         assertEquals(
             "SPDR-SA1-XPDR" + xpdrNb,
-            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst()
-            .get().getNodeRef().getValue());
+            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst().get().getNodeRef().getValue());
         assertEquals(
             "XPDR" + xpdrNb + "-NETWORK1",
         assertEquals(
             "XPDR" + xpdrNb + "-NETWORK1",
-            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst()
-            .get().getTpRef().getValue());
+            tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst().get().getTpRef().getValue());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
         if (xpdrNb.equals(Uint16.valueOf(1))) {
-            assertEquals("should contain 5 TPs", 5, tpList.size());
+            assertEquals(5, tpList.size(), "should contain 5 TPs");
             assertEquals("XPDR1-CLIENT1", tpList.get(0).getTpId().getValue());
             assertEquals("XPDR1-CLIENT2", tpList.get(1).getTpId().getValue());
             assertEquals("XPDR1-NETWORK1", tpList.get(4).getTpId().getValue());
             assertEquals(
             assertEquals("XPDR1-CLIENT1", tpList.get(0).getTpId().getValue());
             assertEquals("XPDR1-CLIENT2", tpList.get(1).getTpId().getValue());
             assertEquals("XPDR1-NETWORK1", tpList.get(4).getTpId().getValue());
             assertEquals(
-                "supported interface capability of tp-id XPDR1-CLIENT2 should contain 2 if-cap-type",
                 2,
                 2,
-                tpList.get(1)
-                    .augmentation(
+                tpList.get(1).augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
-                    .getTpSupportedInterfaces()
-                    .getSupportedInterfaceCapability().values().size());
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().size(),
+                "supported interface capability of tp-id XPDR1-CLIENT2 should contain 2 if-cap-type");
             assertEquals(
             assertEquals(
-                "supported interface capability of tp-id XPDR1-CLIENT3 should contain 3 if-cap-type",
                 3,
                 3,
-                tpList.get(2)
-                    .augmentation(
+                tpList.get(2).augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
-                    .getTpSupportedInterfaces()
-                    .getSupportedInterfaceCapability().values().size());
-            List<SupportedInterfaceCapability> sicListClient1 = tpList.get(0)
-                .augmentation(
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().size(),
+                "supported interface capability of tp-id XPDR1-CLIENT3 should contain 3 if-cap-type");
+            List<SupportedInterfaceCapability> sicListClient1 = tpList.get(0).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                    .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
+                        .TerminationPoint1.class)
+                .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream()
+                .collect(Collectors.toList());
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient1) {
                 assertThat("tp should have 2 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.VALUE)))
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient1) {
                 assertThat("tp should have 2 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.VALUE)))
-                    .or(containsString(String.valueOf(If10GEODU2.VALUE))));
+                        .or(containsString(String.valueOf(If10GEODU2.VALUE))));
             }
             }
-            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(3)
-                .augmentation(
+            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(3).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                    .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
+                        .TerminationPoint1.class)
+                .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream()
+                .collect(Collectors.toList());
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
                 assertThat("tp should have 3 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2, if-10GE",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.VALUE)))
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
                 assertThat("tp should have 3 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2, if-10GE",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.VALUE)))
-                    .or(containsString(String.valueOf(If10GEODU2.VALUE)))
-                    .or(containsString(String.valueOf(If10GE.VALUE))));
+                        .or(containsString(String.valueOf(If10GEODU2.VALUE)))
+                        .or(containsString(String.valueOf(If10GE.VALUE))));
             }
             assertThat("the rate should be ODU2 or ODU2e",
             }
             assertThat("the rate should be ODU2 or ODU2e",
-                String.valueOf(tpList.get(2)
-                    .augmentation(
+                String.valueOf(tpList.get(2).augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
-                    .getXpdrTpPortConnectionAttributes()
-                    .getRate()),
+                    .getXpdrTpPortConnectionAttributes().getRate()),
                 either(containsString(String.valueOf(ODU2e.VALUE)))
                 either(containsString(String.valueOf(ODU2e.VALUE)))
-                .or(containsString(String.valueOf(ODU2.VALUE))));
+                    .or(containsString(String.valueOf(ODU2.VALUE))));
             assertEquals(
             assertEquals(
-                "TP should be of type client",
                 OpenroadmTpType.XPONDERCLIENT,
                 OpenroadmTpType.XPONDERCLIENT,
-                tpList.get(2).augmentation(TerminationPoint1.class).getTpType());
+                tpList.get(2).augmentation(TerminationPoint1.class).getTpType(),
+                "TP should be of type client");
             assertEquals(
             assertEquals(
-                "TP should be of type network",
                 OpenroadmTpType.XPONDERNETWORK,
                 OpenroadmTpType.XPONDERNETWORK,
-                tpList.get(4).augmentation(TerminationPoint1.class).getTpType());
+                tpList.get(4).augmentation(TerminationPoint1.class).getTpType(),
+                "TP should be of type network");
         } else if (xpdrNb.equals(Uint16.valueOf(2))) {
         } else if (xpdrNb.equals(Uint16.valueOf(2))) {
-            assertEquals("should contain 8 TPs", 8, tpList.size());
+            assertEquals(8, tpList.size(), "should contain 8 TPs");
             assertEquals("XPDR2-CLIENT1", tpList.get(0).getTpId().getValue());
             assertEquals("XPDR2-CLIENT2", tpList.get(1).getTpId().getValue());
             assertEquals("XPDR2-NETWORK1", tpList.get(4).getTpId().getValue());
             assertEquals("XPDR2-NETWORK2", tpList.get(5).getTpId().getValue());
             assertEquals(
             assertEquals("XPDR2-CLIENT1", tpList.get(0).getTpId().getValue());
             assertEquals("XPDR2-CLIENT2", tpList.get(1).getTpId().getValue());
             assertEquals("XPDR2-NETWORK1", tpList.get(4).getTpId().getValue());
             assertEquals("XPDR2-NETWORK2", tpList.get(5).getTpId().getValue());
             assertEquals(
-                "only IfOCHOTU4ODU4 interface capabitily expected",
                 IfOCHOTU4ODU4.VALUE,
                 IfOCHOTU4ODU4.VALUE,
-                tpList.get(5)
-                    .augmentation(
+                tpList.get(5).augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                                .TerminationPoint1.class)
-                    .getTpSupportedInterfaces()
-                    .getSupportedInterfaceCapability().values().stream().findFirst()
-                    .get()
-                    .getIfCapType());
+                            .TerminationPoint1.class)
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream().findFirst().get()
+                    .getIfCapType(),
+                "only IfOCHOTU4ODU4 interface capabitily expected");
             assertEquals(
             assertEquals(
-                "supported interface capability of tp should contain 2 IfCapType",
                 2,
                 2,
-                tpList.get(2)
-                    .augmentation(
+                tpList.get(2).augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
-                    .getTpSupportedInterfaces()
-                    .getSupportedInterfaceCapability().values().size());
-            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(2)
-                .augmentation(
+                    .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().size(),
+                "supported interface capability of tp should contain 2 IfCapType");
+            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(2).augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
-                    .TerminationPoint1.class)
-                .getTpSupportedInterfaces()
-                .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
+                        .TerminationPoint1.class)
+                .getTpSupportedInterfaces().getSupportedInterfaceCapability().values().stream()
+                .collect(Collectors.toList());
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
-                assertThat("tp should have 2 if-cap-type: if-100GE-ODU4, if-100GE",
+                assertThat(
+                    "tp should have 2 if-cap-type: if-100GE-ODU4, if-100GE",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If100GEODU4.VALUE)))
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If100GEODU4.VALUE)))
-                    .or(containsString(String.valueOf(If100GE.VALUE))));
+                        .or(containsString(String.valueOf(If100GE.VALUE))));
             }
             assertEquals(
             }
             assertEquals(
-                "TP should be of type client", OpenroadmTpType.XPONDERCLIENT,
-                tpList.get(2).augmentation(TerminationPoint1.class).getTpType());
+                OpenroadmTpType.XPONDERCLIENT,
+                tpList.get(2).augmentation(TerminationPoint1.class).getTpType(),
+                "TP should be of type client");
             assertEquals(
             assertEquals(
-                "TP should be of type network", OpenroadmTpType.XPONDERNETWORK,
-                tpList.get(6).augmentation(TerminationPoint1.class).getTpType());
+                OpenroadmTpType.XPONDERNETWORK,
+                tpList.get(6).augmentation(TerminationPoint1.class).getTpType(),
+                "TP should be of type network");
         }
     }
 }
         }
     }
 }
index 4acee5cbda6f2b79394b0f1e47bd0f8be18f7c83..10b1fd34b625a7e086f75907c78ab71454753803 100644 (file)
@@ -7,11 +7,11 @@
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
@@ -28,12 +28,11 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
 import org.mockito.stubbing.Answer;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.mockito.stubbing.Answer;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -72,18 +71,18 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.Uint16;
 
 
 import org.opendaylight.yangtools.yang.common.Uint16;
 
 
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
+@ExtendWith(MockitoExtension.class)
 public class OpenRoadmTopologyTest {
     @Mock
     private NetworkTransactionService networkTransactionService;
 
     @Test
 public class OpenRoadmTopologyTest {
     @Mock
     private NetworkTransactionService networkTransactionService;
 
     @Test
-    public void createTopologyShardForDegreeTest() {
+    void createTopologyShardForDegreeTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 2, List.of());
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 2, List.of());
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain 2 Degree nodes only", 2, topologyShard.getNodes().size());
-        assertEquals("Should contain 2 links", 2, topologyShard.getLinks().size());
+        assertEquals(2, topologyShard.getNodes().size(), "Should contain 2 Degree nodes only");
+        assertEquals(2, topologyShard.getLinks().size(), "Should contain 2 links");
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
@@ -95,7 +94,7 @@ public class OpenRoadmTopologyTest {
         List<Link> links = topologyShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         List<Link> links = topologyShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("Should contain 2 express links", 2, links.size());
+        assertEquals(2, links.size(), "Should contain 2 express links");
         assertEquals("ROADMA01-DEG1-DEG1-CTP-TXRXtoROADMA01-DEG2-DEG2-CTP-TXRX", links.get(0).getLinkId().getValue());
         assertEquals("ROADMA01-DEG1", links.get(0).getSource().getSourceNode().getValue());
         assertEquals("DEG1-CTP-TXRX", links.get(0).getSource().getSourceTp().getValue());
         assertEquals("ROADMA01-DEG1-DEG1-CTP-TXRXtoROADMA01-DEG2-DEG2-CTP-TXRX", links.get(0).getLinkId().getValue());
         assertEquals("ROADMA01-DEG1", links.get(0).getSource().getSourceNode().getValue());
         assertEquals("DEG1-CTP-TXRX", links.get(0).getSource().getSourceTp().getValue());
@@ -109,29 +108,29 @@ public class OpenRoadmTopologyTest {
     }
 
     @Test
     }
 
     @Test
-    public void createTopologyShardForSrgTest() {
-        Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 0,
-            List.of(Integer.valueOf(1)));
+    void createTopologyShardForSrgTest() {
+        Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm(
+                "ROADMA01", "nodeA", 0, List.of(Integer.valueOf(1)));
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         List<Node> nodes = topologyShard.getNodes();
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         List<Node> nodes = topologyShard.getNodes();
-        assertEquals("Should contain 1 SRG node only", 1, nodes.size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(1, nodes.size(), "Should contain 1 SRG node only");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkSrgNode("1", nodes.get(0));
     }
 
     @Test
         checkSrgNode("1", nodes.get(0));
     }
 
     @Test
-    public void createTopologyShardForMultipleSrgTest() {
+    void createTopologyShardForMultipleSrgTest() {
         List<Integer> srgNbs = List.of(Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(10),
         List<Integer> srgNbs = List.of(Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(10),
-            Integer.valueOf(11));
+                Integer.valueOf(11));
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 0, srgNbs);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 0, srgNbs);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         List<Node> nodes = topologyShard.getNodes().stream()
             .sorted((n1, n2) -> n1.getNodeId().getValue().compareTo(n2.getNodeId().getValue()))
             .collect(Collectors.toList());
-        assertEquals("Should contain 4 SRG nodes", 4, nodes.size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(4, nodes.size(), "Should contain 4 SRG nodes");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkSrgNode("1", nodes.get(0));
         checkSrgNode("10", nodes.get(1));
         checkSrgNode("11", nodes.get(2));
         checkSrgNode("1", nodes.get(0));
         checkSrgNode("10", nodes.get(1));
         checkSrgNode("11", nodes.get(2));
@@ -139,76 +138,77 @@ public class OpenRoadmTopologyTest {
     }
 
     @Test
     }
 
     @Test
-    public void createTopologyShardForCompleteRdmNodeTest() {
+    void createTopologyShardForCompleteRdmNodeTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 2,
             List.of(Integer.valueOf(1), Integer.valueOf(2)));
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", "nodeA", 2,
             List.of(Integer.valueOf(1), Integer.valueOf(2)));
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain 2 Deg and 2 SRG nodes", 4, topologyShard.getNodes().size());
+        assertEquals(4, topologyShard.getNodes().size(), "Should contain 2 Deg and 2 SRG nodes");
         List<Link> addLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.ADDLINK))
             .collect(Collectors.toList());
         List<Link> addLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.ADDLINK))
             .collect(Collectors.toList());
-        assertEquals("Should contain 4 add links", 4, addLinks.size());
+        assertEquals(4, addLinks.size(), "Should contain 4 add links");
         List<Link> dropLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.DROPLINK))
             .collect(Collectors.toList());
         List<Link> dropLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.DROPLINK))
             .collect(Collectors.toList());
-        assertEquals("Should contain 4 drop links", 4, dropLinks.size());
+        assertEquals(4, dropLinks.size(), "Should contain 4 drop links");
         List<Link> expressLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.EXPRESSLINK))
             .collect(Collectors.toList());
         List<Link> expressLinks = topologyShard.getLinks().stream()
             .filter(lk -> lk.augmentation(Link1.class).getLinkType().equals(OpenroadmLinkType.EXPRESSLINK))
             .collect(Collectors.toList());
-        assertEquals("Should contain 2 express links", 2, expressLinks.size());
+        assertEquals(2, expressLinks.size(), "Should contain 2 express links");
     }
 
     @Test
     }
 
     @Test
-    public void createTopologyShardForTpdrNodeTest() {
+    void createTopologyShardForTpdrNodeTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, null);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, null);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain a single node", 1, topologyShard.getNodes().size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(1, topologyShard.getNodes().size(), "Should contain a single node");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkTpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
         checkTpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
-    public void createTopologyShardForTpdrNode2Test() {
+    void createTopologyShardForTpdrNode2Test() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Tpdr);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Tpdr);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain a single node", 1, topologyShard.getNodes().size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(1, topologyShard.getNodes().size(), "Should contain a single node");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkTpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
         checkTpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
-    public void createTopologyShardForMpdrNodeTest() {
+    void createTopologyShardForMpdrNodeTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Mpdr);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Mpdr);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain a single node", 1, topologyShard.getNodes().size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(1, topologyShard.getNodes().size(), "Should contain a single node");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkOtnXpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
         checkOtnXpdrNode(topologyShard.getNodes().get(0));
     }
 
     @Test
-    public void createTopologyShardForSwitchNodeTest() {
+    void createTopologyShardForSwitchNodeTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Switch);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForXpdr("XPDRA01", "nodeA", 2, 2, XpdrNodeTypes.Switch);
         TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
         assertNotNull(topologyShard);
-        assertEquals("Should contain a single node", 1, topologyShard.getNodes().size());
-        assertEquals("Should contain 0 link", 0, topologyShard.getLinks().size());
+        assertEquals(1, topologyShard.getNodes().size(), "Should contain a single node");
+        assertEquals(0, topologyShard.getLinks().size(), "Should contain 0 link");
         checkOtnXpdrNode(topologyShard.getNodes().get(0));
     }
 
         checkOtnXpdrNode(topologyShard.getNodes().get(0));
     }
 
-    @Ignore
     @Test
     @Test
-    public void createTopologyShardForRdmWithoutClliTest() {
+    void createTopologyShardForRdmWithoutClliTest() {
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", null, 2, List.of());
         Nodes mappingNode = NetworkmodelTestUtil.createMappingForRdm("ROADMA01", null, 2, List.of());
-        TopologyShard topologyShard = OpenRoadmTopology.createTopologyShard(mappingNode);
-        assertNull("clli must not be null", topologyShard);
+        Exception exception = assertThrows(NullPointerException.class, () -> {
+            OpenRoadmTopology.createTopologyShard(mappingNode);
+        });
+        assertTrue("Supplied value may not be null".contains(exception.getMessage()));
     }
 
     @Test
     }
 
     @Test
-    public void deleteLinkOkTest() throws InterruptedException, ExecutionException {
+    void deleteLinkOkTest() throws InterruptedException, ExecutionException {
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
@@ -223,9 +223,11 @@ public class OpenRoadmTopologyTest {
                 .build())
             .addAugmentation(link1)
             .build();
                 .build())
             .addAugmentation(link1)
             .build();
-        InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
-            new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).augmentation(Network1.class)
-            .child(Link.class, new LinkKey(linkId)).build();
+        InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .augmentation(Network1.class)
+            .child(Link.class, new LinkKey(linkId))
+            .build();
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID))
             .thenReturn(new LinkFuture(link));
 
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID))
             .thenReturn(new LinkFuture(link));
 
@@ -241,29 +243,31 @@ public class OpenRoadmTopologyTest {
 
         boolean result = OpenRoadmTopology.deleteLink("ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX",
             networkTransactionService);
 
         boolean result = OpenRoadmTopology.deleteLink("ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX",
             networkTransactionService);
-        assertTrue("link deletion should be ok", result);
+        assertTrue(result, "link deletion should be ok");
     }
 
     @Test
     }
 
     @Test
-    public void deleteLinkNotOkTest() throws InterruptedException, ExecutionException {
+    void deleteLinkNotOkTest() throws InterruptedException, ExecutionException {
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
         String destTp = "SRG1-CP-TXRX";
         LinkId linkId = LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp);
 
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
         String destTp = "SRG1-CP-TXRX";
         LinkId linkId = LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp);
 
-        InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class).child(Network.class,
-            new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID))).augmentation(Network1.class)
-            .child(Link.class, new LinkKey(linkId)).build();
+        InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class)
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .augmentation(Network1.class)
+            .child(Link.class, new LinkKey(linkId))
+            .build();
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID)).thenReturn(new LinkFuture());
 
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID)).thenReturn(new LinkFuture());
 
-        boolean result = OpenRoadmTopology.deleteLink("ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX",
-            networkTransactionService);
-        assertFalse("link deletion should not be ok", result);
+        boolean result = OpenRoadmTopology.deleteLink(
+                "ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX", networkTransactionService);
+        assertFalse(result, "link deletion should not be ok");
     }
 
     @Test
     }
 
     @Test
-    public void deleteLinkExceptionTest() throws InterruptedException, ExecutionException {
+    void deleteLinkExceptionTest() throws InterruptedException, ExecutionException {
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
         String srcNode = "ROADM-A1-DEG1";
         String dstNode = "ROADM-A1-SRG1";
         String srcTp = "DEG1-CTP-TXRX";
@@ -271,14 +275,16 @@ public class OpenRoadmTopologyTest {
         LinkId linkId = LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp);
 
         InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class)
         LinkId linkId = LinkIdUtil.buildLinkId(srcNode, srcTp, dstNode, destTp);
 
         InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Networks.class)
-                .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
-                .augmentation(Network1.class).child(Link.class, new LinkKey(linkId)).build();
+            .child(Network.class, new NetworkKey(new NetworkId(NetworkUtils.OVERLAY_NETWORK_ID)))
+            .augmentation(Network1.class)
+            .child(Link.class, new LinkKey(linkId))
+            .build();
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID))
         when(networkTransactionService.read(LogicalDatastoreType.CONFIGURATION, linkIID))
-                .thenReturn(new InterruptedLinkFuture());
-        boolean result = OpenRoadmTopology.deleteLink("ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX",
-                networkTransactionService);
+            .thenReturn(new InterruptedLinkFuture());
+        boolean result = OpenRoadmTopology.deleteLink(
+                "ROADM-A1-DEG1", "ROADM-A1-SRG1", "DEG1-CTP-TXRX", "SRG1-CP-TXRX", networkTransactionService);
         verify(networkTransactionService, never()).merge(any(), any(), any());
         verify(networkTransactionService, never()).merge(any(), any(), any());
-        assertFalse("Result should be false du to InterruptedException", result);
+        assertFalse(result, "Result should be false du to InterruptedException");
     }
 
     private void checkDegreeNode(String nodeNb, Node node) {
     }
 
     private void checkDegreeNode(String nodeNb, Node node) {
@@ -292,18 +298,19 @@ public class OpenRoadmTopologyTest {
         assertEquals("openroadm-network", supportingNodes.get(1).getNetworkRef().getValue());
         assertEquals("ROADMA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.DEGREE, node.augmentation(Node1.class).getNodeType());
         assertEquals("openroadm-network", supportingNodes.get(1).getNetworkRef().getValue());
         assertEquals("ROADMA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.DEGREE, node.augmentation(Node1.class).getNodeType());
-        assertEquals(Uint16.valueOf(nodeNb), node.augmentation(
-            org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
-            .getDegreeAttributes().getDegreeNumber());
+        assertEquals(
+            Uint16.valueOf(nodeNb),
+            node.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
+                .getDegreeAttributes().getDegreeNumber());
         List<AvailFreqMaps> availFreqMapsValues = new ArrayList<>(node.augmentation(
         List<AvailFreqMaps> availFreqMapsValues = new ArrayList<>(node.augmentation(
-            org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
+                org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
             .getDegreeAttributes().getAvailFreqMaps().values());
         assertEquals(GridConstant.NB_OCTECTS, availFreqMapsValues.get(0).getFreqMap().length);
         byte[] byteArray = new byte[GridConstant.NB_OCTECTS];
         Arrays.fill(byteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
         assertEquals(Arrays.toString(byteArray), Arrays.toString(availFreqMapsValues.get(0).getFreqMap()));
         List<TerminationPoint> tps = node.augmentation(
             .getDegreeAttributes().getAvailFreqMaps().values());
         assertEquals(GridConstant.NB_OCTECTS, availFreqMapsValues.get(0).getFreqMap().length);
         byte[] byteArray = new byte[GridConstant.NB_OCTECTS];
         Arrays.fill(byteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
         assertEquals(Arrays.toString(byteArray), Arrays.toString(availFreqMapsValues.get(0).getFreqMap()));
         List<TerminationPoint> tps = node.augmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
@@ -327,13 +334,13 @@ public class OpenRoadmTopologyTest {
         assertEquals(OpenroadmNodeType.SRG, node.augmentation(Node1.class).getNodeType());
         List<AvailFreqMaps> availFreqMapsValues = new ArrayList<>(node.augmentation(
                 org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
         assertEquals(OpenroadmNodeType.SRG, node.augmentation(Node1.class).getNodeType());
         List<AvailFreqMaps> availFreqMapsValues = new ArrayList<>(node.augmentation(
                 org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1.class)
-                .getSrgAttributes().getAvailFreqMaps().values());
+            .getSrgAttributes().getAvailFreqMaps().values());
         assertEquals(GridConstant.NB_OCTECTS, availFreqMapsValues.get(0).getFreqMap().length);
         byte[] byteArray = new byte[GridConstant.NB_OCTECTS];
         Arrays.fill(byteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
         assertEquals(Arrays.toString(byteArray), Arrays.toString(availFreqMapsValues.get(0).getFreqMap()));
         List<TerminationPoint> tps = node.augmentation(
         assertEquals(GridConstant.NB_OCTECTS, availFreqMapsValues.get(0).getFreqMap().length);
         byte[] byteArray = new byte[GridConstant.NB_OCTECTS];
         Arrays.fill(byteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
         assertEquals(Arrays.toString(byteArray), Arrays.toString(availFreqMapsValues.get(0).getFreqMap()));
         List<TerminationPoint> tps = node.augmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
@@ -356,25 +363,22 @@ public class OpenRoadmTopologyTest {
         assertEquals("XPDRA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.XPONDER, node.augmentation(Node1.class).getNodeType());
         List<TerminationPoint> tps = node.augmentation(
         assertEquals("XPDRA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.XPONDER, node.augmentation(Node1.class).getNodeType());
         List<TerminationPoint> tps = node.augmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
         assertEquals(4, tps.size());
         assertEquals("XPDR1-CLIENT1", tps.get(0).getTpId().getValue());
         assertEquals(OpenroadmTpType.XPONDERCLIENT, tps.get(0).augmentation(TerminationPoint1.class).getTpType());
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
         assertEquals(4, tps.size());
         assertEquals("XPDR1-CLIENT1", tps.get(0).getTpId().getValue());
         assertEquals(OpenroadmTpType.XPONDERCLIENT, tps.get(0).augmentation(TerminationPoint1.class).getTpType());
-        assertEquals("XPDR1-NETWORK1", tps.get(0).augmentation(TerminationPoint1.class)
-                .getAssociatedConnectionMapTp()
-                .iterator()
-                .next()
+        assertEquals(
+            "XPDR1-NETWORK1",
+            tps.get(0).augmentation(TerminationPoint1.class).getAssociatedConnectionMapTp().iterator().next()
                 .getValue());
         assertEquals("XPDR1-NETWORK1", tps.get(2).getTpId().getValue());
         assertEquals(OpenroadmTpType.XPONDERNETWORK, tps.get(2).augmentation(TerminationPoint1.class).getTpType());
                 .getValue());
         assertEquals("XPDR1-NETWORK1", tps.get(2).getTpId().getValue());
         assertEquals(OpenroadmTpType.XPONDERNETWORK, tps.get(2).augmentation(TerminationPoint1.class).getTpType());
-        assertEquals("XPDR1-CLIENT1", tps.get(2).augmentation(
-                TerminationPoint1.class)
-                .getAssociatedConnectionMapTp()
-                .iterator()
-                .next()
+        assertEquals(
+            "XPDR1-CLIENT1",
+            tps.get(2).augmentation(TerminationPoint1.class).getAssociatedConnectionMapTp().iterator().next()
                 .getValue());
     }
 
                 .getValue());
     }
 
@@ -390,7 +394,7 @@ public class OpenRoadmTopologyTest {
         assertEquals("XPDRA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.XPONDER, node.augmentation(Node1.class).getNodeType());
         List<TerminationPoint> tps = node.augmentation(
         assertEquals("XPDRA01", supportingNodes.get(1).getNodeRef().getValue());
         assertEquals(OpenroadmNodeType.XPONDER, node.augmentation(Node1.class).getNodeType());
         List<TerminationPoint> tps = node.augmentation(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
             .nonnullTerminationPoint().values().stream()
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
index 667997583e6b4f1ae58d20a9342543803d9bf152..a8d7aabcadbbcc7784ed7683653d189707ba0d7c 100644 (file)
@@ -7,12 +7,13 @@
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
  */
 package org.opendaylight.transportpce.networkmodel.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.concurrent.ExecutionException;
 
 import java.util.concurrent.ExecutionException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
 import org.opendaylight.transportpce.test.AbstractTest;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
 import org.opendaylight.transportpce.test.AbstractTest;
@@ -32,81 +33,84 @@ public class TpceNetworkTest extends AbstractTest {
     TpceNetwork tpceNetwork = new TpceNetwork(new NetworkTransactionImpl(getDataBroker()));
 
     @Test
     TpceNetwork tpceNetwork = new TpceNetwork(new NetworkTransactionImpl(getDataBroker()));
 
     @Test
-    public void createLayerClliTest() throws InterruptedException, ExecutionException {
+    void createLayerClliTest() throws InterruptedException, ExecutionException {
         tpceNetwork.createLayer("clli-network");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("clli-network")));
         Network createdClli = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
         tpceNetwork.createLayer("clli-network");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("clli-network")));
         Network createdClli = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
-        assertNotNull("Clli layer should be created and not null", createdClli);
+        assertNotNull(createdClli, "Clli layer should be created and not null");
 
         Augmentation<NetworkTypes> ordClli = new NetworkTypes1Builder()
             .setClliNetwork(new ClliNetworkBuilder().build())
             .build();
 
         Augmentation<NetworkTypes> ordClli = new NetworkTypes1Builder()
             .setClliNetwork(new ClliNetworkBuilder().build())
             .build();
-        assertNotNull("clli augmentation should not be null", createdClli.getNetworkTypes()
-            .augmentation(NetworkTypes1.class));
-        assertEquals("bad clli augmentation for network-types", ordClli,
-            createdClli.getNetworkTypes().augmentation(NetworkTypes1.class));
+        assertNotNull(createdClli.getNetworkTypes().augmentation(NetworkTypes1.class),
+            "clli augmentation should not be null");
+        assertEquals(ordClli, createdClli.getNetworkTypes().augmentation(NetworkTypes1.class),
+            "bad clli augmentation for network-types");
     }
 
     @Test
     }
 
     @Test
-    public void createLayerNetworkTest() throws InterruptedException, ExecutionException {
+    void createLayerNetworkTest() throws InterruptedException, ExecutionException {
         tpceNetwork.createLayer("openroadm-network");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("openroadm-network")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
         tpceNetwork.createLayer("openroadm-network");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("openroadm-network")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
-        assertNotNull("openroadm-network layer should be created and not null", createdOrdNetwork);
+        assertNotNull(createdOrdNetwork, "openroadm-network layer should be created and not null");
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
-    public void createLayerTopologyTest() throws InterruptedException, ExecutionException {
+    void createLayerTopologyTest() throws InterruptedException, ExecutionException {
         tpceNetwork.createLayer("openroadm-topology");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("openroadm-topology")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
         tpceNetwork.createLayer("openroadm-topology");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("openroadm-topology")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
-        assertNotNull("openroadm-logpology layer should be created and not null", createdOrdNetwork);
+        assertNotNull(createdOrdNetwork, "openroadm-logpology layer should be created and not null");
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
-    public void createLayerOtnTest() throws InterruptedException, ExecutionException {
+    void createLayerOtnTest() throws InterruptedException, ExecutionException {
         tpceNetwork.createLayer("otn-topology");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("otn-topology")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
         tpceNetwork.createLayer("otn-topology");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("otn-topology")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
-        assertNotNull("otn-logpology layer should be created and not null", createdOrdNetwork);
+        assertNotNull(createdOrdNetwork, "otn-logpology layer should be created and not null");
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
         commonNetworkAugmentationTest(createdOrdNetwork);
     }
 
     @Test
-    public void createBadLayerTest() throws InterruptedException, ExecutionException {
+    void createBadLayerTest() throws InterruptedException, ExecutionException {
         tpceNetwork.createLayer("toto");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("toto")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
         tpceNetwork.createLayer("toto");
         InstanceIdentifier<Network> nwIID = InstanceIdentifier.create(Networks.class)
             .child(Network.class, new NetworkKey(new NetworkId("toto")));
         Network createdOrdNetwork = getDataBroker().newReadOnlyTransaction()
             .read(LogicalDatastoreType.CONFIGURATION, nwIID).get().get();
-        assertNotNull("toto layer should be created and not null", createdOrdNetwork);
-        assertNull("toto layer should not have any network-type augmentation", createdOrdNetwork.getNetworkTypes()
-            .augmentation(NetworkTypes1.class));
-        assertNull("toto layer should not have any network-type augmentation", createdOrdNetwork.getNetworkTypes()
-            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210
-            .NetworkTypes1.class));
+        assertNotNull(createdOrdNetwork, "toto layer should be created and not null");
+        assertNull(createdOrdNetwork.getNetworkTypes().augmentation(NetworkTypes1.class),
+            "toto layer should not have any network-type augmentation");
+        assertNull(
+            createdOrdNetwork.getNetworkTypes().augmentation(
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1.class),
+            "toto layer should not have any network-type augmentation");
     }
 
     private void commonNetworkAugmentationTest(Network createdOrdNetwork) {
         Augmentation<NetworkTypes> ordComNet
             = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1Builder()
     }
 
     private void commonNetworkAugmentationTest(Network createdOrdNetwork) {
         Augmentation<NetworkTypes> ordComNet
             = new org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1Builder()
-            .setOpenroadmCommonNetwork(new OpenroadmCommonNetworkBuilder().build())
-            .build();
-        assertNotNull("common-network augmentation should not be null", createdOrdNetwork.getNetworkTypes()
-            .augmentation(
-                org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1.class));
-        assertEquals("bad common-network augmentation for network-types", ordComNet, createdOrdNetwork.getNetworkTypes()
-            .augmentation(
-                org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1.class));
+                .setOpenroadmCommonNetwork(new OpenroadmCommonNetworkBuilder().build())
+                .build();
+        assertNotNull(
+            createdOrdNetwork.getNetworkTypes().augmentation(
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1.class),
+            "common-network augmentation should not be null");
+        assertEquals(
+            ordComNet, createdOrdNetwork.getNetworkTypes().augmentation(
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.NetworkTypes1.class),
+            "bad common-network augmentation for network-types");
     }
 }
     }
 }