TAPI topology Service RPCs impl
[transportpce.git] / tapi / src / test / java / org / opendaylight / transportpce / tapi / topology / TapiTopologyImplExceptionTest.java
index a130d44c6b85e5a2cc11818753ae2be5e60265ee..35cfb96896d1169aa4c894d0692f43aacb7c4f65 100644 (file)
@@ -62,8 +62,12 @@ public class TapiTopologyImplExceptionTest {
         TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(dataBroker, tapiContext, topologyUtils);
         ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
         RpcResult<GetTopologyDetailsOutput> rpcResult = result.get();
-        Topology topology = rpcResult.getResult().getTopology();
-        assertNull("Topology should be null", topology);
+        if (rpcResult.isSuccessful()) {
+            Topology topology = rpcResult.getResult().getTopology();
+            assertNull("Topology should be null", topology);
+        } else {
+            assertNull("Topology should be null", null);
+        }
     }
 
     private class ReadTransactionMock implements ReadTransaction {