### Question:
ProxyNetworkAgent { @AnyThread public void dump(@NonNull final IndentingPrintWriter ipw) { ipw.printPair("Network agent id", (mCurrentNetworkAgent == null) ? "none" : mCurrentNetworkAgent.netId); ipw.printPair("score", (mCurrentNetworkAgent == null) ? 0 : mCurrentNetworkScore); ipw.println(); ipw.increaseIndent(); for (Map.Entry<NetworkAgent, NetworkInfo> entry : mNetworkAgents.entrySet()) { ipw.printPair(entry.getKey().toString(), entry.getValue()); } ipw.decreaseIndent(); ipw.println(); } 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 testDump_NoAgent() { mProxyNetworkAgent.mCurrentNetworkAgent = null; mProxyNetworkAgent.dump(mockIndentingPrintWriter); verify(mockIndentingPrintWriter).printPair(anyString(), anyString()); }
@Test public void testDump_ExistingAgent() { mProxyNetworkAgent.mCurrentNetworkAgent = mockNetworkAgent; mProxyNetworkAgent.dump(mockIndentingPrintWriter); verify(mockIndentingPrintWriter, atLeast(1)).printPair(anyString(), anyInt()); }