### Question:
ProxyNetworkAgent { @MainThread protected void sendCapabilities(final NetworkCapabilities capabilities) { DebugAssert.isMainThread(); if (mCurrentNetworkAgent != null) { mCurrentNetworkAgent.sendNetworkCapabilities(capabilities); } else { Log.w(TAG, "Send capabilities with no network agent"); } } protected  ProxyNetworkAgent(
            @NonNull final Context context,
            @NonNull final NetworkCapabilities capabilities,
            @NonNull final ProxyLinkProperties proxyLinkProperties); @AnyThread void dump(@NonNull final IndentingPrintWriter ipw);  }### Answer:
@Test public void testSendCapabilities_NoAgent() { mProxyNetworkAgent.mCurrentNetworkAgent = null; mProxyNetworkAgent.sendCapabilities(mockCapabilities); verify(mockNetworkAgent, never()).sendNetworkCapabilities(mockCapabilities); }
@Test public void testSendCapabilities_ExistingAgent() { mProxyNetworkAgent.mCurrentNetworkAgent = mockNetworkAgent; mProxyNetworkAgent.sendCapabilities(mockCapabilities); verify(mockNetworkAgent).sendNetworkCapabilities(mockCapabilities); }