Verify that IkeNetworkDiedException is for the right Network.

Bug: 172012612
Test: atest FrameworksIkeTests
Change-Id: I383e8bc4a70bb4098b27a2dae60b39dcf2d2722a
diff --git a/tests/iketests/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachineTest.java b/tests/iketests/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachineTest.java
index b243675..ffc41de 100644
--- a/tests/iketests/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachineTest.java
+++ b/tests/iketests/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachineTest.java
@@ -5349,7 +5349,10 @@
         IkeDefaultNetworkCallback callback = verifyMobikeEnabled(true /* doesPeerSupportMobike */);
         callback.onLost(mMockDefaultNetwork);
 
-        verify(mMockIkeSessionCallback).onError(any(IkeNetworkDiedException.class));
+        ArgumentCaptor<IkeException> exceptionCaptor = ArgumentCaptor.forClass(IkeException.class);
+        verify(mMockIkeSessionCallback).onError(exceptionCaptor.capture());
+        IkeNetworkDiedException cause = (IkeNetworkDiedException) exceptionCaptor.getValue();
+        assertEquals(mMockDefaultNetwork, cause.getNetwork());
     }
 
     @Test