### Question:
EchoFilter implements TCPProxyFilter { @Override public void connectionOpened(ConnectionDetails connectionDetails) { m_out.println("--- " + connectionDetails + " opened --"); } EchoFilter(PrintWriter output); @Override byte[] handle(ConnectionDetails connectionDetails,
                                 byte[] buffer,
                                 int bytesRead); @Override void connectionOpened(ConnectionDetails connectionDetails); @Override void connectionClosed(ConnectionDetails connectionDetails);  }### Answer:
@Test public void testConnectionOpened() throws Exception { final EchoFilter echoFilter = new EchoFilter(m_out); echoFilter.connectionOpened(m_connectionDetails); final String output = m_outString.toString(); assertContains(output, m_connectionDetails.toString()); assertContains(output, "opened"); }