*/
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;
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;
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());
RpcResult<GetTopologyDetailsOutput> 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");
}
}
// TODO Auto-generated method stub
}
}
-
-}
+}
\ No newline at end of file