### Question:
PackStream implements RpcStreamer { @Override public void attach(RpcConnection rpcConnection) { Objects.requireNonNull(rpcConnection, "rpcConnection may not be null"); log.info("Attaching PackStream to: {}", rpcConnection); startListening(rpcConnection.getIncomingStream()); rpcSender.attach(rpcConnection.getOutgoingStream()); } PackStream(RpcSender rpcSender, RpcListener rpcListener);  PackStream(RpcSender rpcSender, RpcListener rpcListener, MessageIdGenerator messageIdGenerator); @Override void attach(RpcConnection rpcConnection); @Override void send(Message message); @Override void send(RequestMessage.Builder requestMessage); @Override void send(RequestMessage.Builder requestMessage, RpcListener.ResponseCallback responseCallback); @Override void addRequestCallback(RpcListener.RequestCallback requestCallback); @Override void removeRequestCallback(RpcListener.RequestCallback requestCallback); @Override void addNotificationCallback(RpcListener.NotificationCallback notificationCallback); @Override void removeNotificationCallback(RpcListener.NotificationCallback notificationCallback); @Override void stop(); static final Logger log; }### Answer:
@Test public void testAttach() { packStream.attach(connection); verify(rpcListener).listenForRequests(any()); verify(rpcListener).listenForNotifications(any()); verify(rpcListener).start(inputStream); verify(rpcSender).attach(outputStream); }