RpcStreamConnection extends RpcConnection { private void processNameArgs(@Nonnull RpcPacket packet, @Nonnull final RpcPacketSupplier argsSupplier) { Map<String, Object> mapArgs = packet.getMapArgs(); if (nonNull(mapArgs)) { for (Map.Entry<String, Object> entry : mapArgs.entrySet()) { reallocateSendBufferInPutPacketIfRunOut(argsSupplier, marshalPacketField(entry.getKey(), entry.getValue()), SENDBUF_REALLOC_INCR); } } } RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, boolean secure);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, Socket socket);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, RpcSocketPool pool);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, Socket socket, boolean secure);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, RpcSocketPool pool, boolean secure);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, Socket socket, RpcSocketPool pool, boolean secure);  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, Charset charset, Socket socket, RpcSocketPool pool, boolean secure,
            String rsh); String getServerIpPort(); String getClientIpPort(); void disconnect(final RpcPacketDispatcher dispatcher); RpcPacket getRpcPacket(); RpcPacket getRpcPacket(final RpcPacketFieldRule fieldRule,
            final IFilterCallback filterCallback); int getSystemRecvBufferSize(); int getSystemSendBufferSize(); long putRpcPackets(@Nonnull RpcPacket[] packets); long putRpcPacket(@Nonnull RpcPacket packet); @Override void useConnectionCompression(); static final String TRACE_PREFIX; }
@Test public void processNameArgs() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { ImmutableMap<String, Object> nameArgs = ImmutableMap.of("key1", "value1"); RpcPacket packet = RpcPacket.constructRpcPacket(RpcFunctionSpec.CLIENT_ACK, nameArgs, null); RpcStreamConnection.RpcPacketSupplier supplier = createMockRpcPacketSupplier(); Method processNameArgs = getPrivateMethod(RpcStreamConnection.class, "processNameArgs", RpcPacket.class, RpcStreamConnection.RpcPacketSupplier.class); processNameArgs.invoke(mockConnection, packet, supplier); verifyMockRpcPacketSupplier(supplier, nameArgs.size()); }