### Question:
TCPIPClient extends AbstractMINATCPService { @Override public TCPIPSession getSession() { return (TCPIPSession)super.getSession(); }  @Override TCPIPSession getSession(); @Deprecated boolean sendMessage(IMessage message, long timeOut); @Override void sessionCreated(IoSession session); @Override void sessionClosed(IoSession session); @Override void exceptionCaught(IoSession session, Throwable cause); @Override TCPIPSettings getSettings(); IFieldConverter getFieldConverter(); @Override IMessage receive(IActionContext actionContext, IMessage msg);  }### Answer:
@Test public void testConnection() throws Exception { logger.info("start testConnection()"); try { startServices(LOGIN_TIMEOUT); Assert.assertTrue(client.isConnected()); IMessage msg = DefaultMessageFactory.getFactory().createMessage(TCPIPMessageHelper.INCOMING_MESSAGE_NAME_AND_NAMESPACE, TCPIPMessageHelper.INCOMING_MESSAGE_NAME_AND_NAMESPACE); msg.addField("MessageType", 123); msg.addField("Qty", 123.123); msg.addField("ClOrdID", ""); client.getSession().send(msg); if (logger.isDebugEnabled()) { logger.debug("start to waiting messages on server; {} millisec", WAITING_TIMEOUT); } Pair<IMessage, ComparisonResult> result = waitMessage(server, msg, WAITING_TIMEOUT, ServiceHandlerRoute.FROM_APP, dictionaryName); ComparisonResult comparison=result.getSecond(); Assert.assertEquals("Status of comparison isn't " + StatusType.PASSED + "; see: \n" + comparison, StatusType.PASSED, comparison.getStatus()); if (logger.isDebugEnabled()) { logger.debug("end to waiting messages on server. Result: {} messages found", result.getFirst()); } for (IoSession session:server.getSessionMap().keySet()){ session.write(msg); } if (logger.isDebugEnabled()) { logger.debug("start to waiting messages on client; {} millisec", WAITING_TIMEOUT); } result = waitMessage(client, msg, WAITING_TIMEOUT, ServiceHandlerRoute.FROM_APP, dictionaryName); comparison = result.getSecond(); Assert.assertEquals("Status of comparison isn't " + StatusType.PASSED + "; see: \n" + comparison, StatusType.PASSED, comparison.getStatus()); if (logger.isDebugEnabled()) { logger.debug("end to waiting messages on client. Result: {} messages found", result.getFirst()); } } catch (Exception e) { logger.error(e.getMessage(), e); throw e; } finally { logger.info("end testConnection()"); client.dispose(); Assert.assertEquals(ServiceStatus.DISPOSED, client.getStatus()); } }