X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Ftapi%2Ftopology%2FTapiTopologyImplExceptionTest.java;h=31556e8c5a235be8c051e076fe84b0bd386e4455;hb=ee81f24e14686bfb96cfa404592ad89117c01aa7;hp=9f4f466e73e0ed9a37fe76e736cb3dcc3ab090e2;hpb=e50901c4b06c82b91f136dac09bacce01258d7b2;p=transportpce.git diff --git a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java index 9f4f466e7..31556e8c5 100644 --- a/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java +++ b/tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/TapiTopologyImplExceptionTest.java @@ -7,7 +7,7 @@ */ package org.opendaylight.transportpce.tapi.topology; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -17,7 +17,7 @@ import com.google.common.util.concurrent.ListenableFuture; import java.util.Optional; import java.util.concurrent.ExecutionException; import org.eclipse.jdt.annotation.NonNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -39,14 +39,14 @@ import org.opendaylight.yangtools.yang.common.RpcResult; public class TapiTopologyImplExceptionTest { @Mock - TapiContext tapiContext; + private TapiContext tapiContext; @Mock - TopologyUtils topologyUtils; + private TopologyUtils topologyUtils; @Mock - TapiLink tapiLink; + private TapiLink tapiLink; @Test - public void getTopologyDetailsWithExceptionTest() throws InterruptedException, ExecutionException { + void getTopologyDetailsWithExceptionTest() throws InterruptedException, ExecutionException { DataBroker dataBroker = mock(DataBroker.class); when(dataBroker.newReadOnlyTransaction()) .thenReturn(new ReadTransactionMock()); @@ -70,9 +70,9 @@ public class TapiTopologyImplExceptionTest { RpcResult rpcResult = result.get(); if (rpcResult.isSuccessful()) { Topology topology = rpcResult.getResult().getTopology(); - assertNull("Topology should be null", topology); + assertNull(topology, "Topology should be null"); } else { - assertNull("Topology should be null", null); + assertNull(null, "Topology should be null"); } } @@ -102,5 +102,4 @@ public class TapiTopologyImplExceptionTest { // TODO Auto-generated method stub } } - -} +} \ No newline at end of file