### Question:
TcpSocketRpcConnection implements RpcConnection { @Override public void close() throws IOException { log.info("Closing socket: {}", socket); socket.close(); } TcpSocketRpcConnection(Socket socket); @Override InputStream getIncomingStream(); @Override OutputStream getOutgoingStream(); @Override void close(); @Override String toString(); static final Logger log; }### Answer:
@Test public void testClose() throws IOException { tcpSocketRpcConnection.close(); verify(socket).close(); }