TunnelMeta implements Serializable { @Override public String toString() { StringBuffer sb = new StringBuffer("{"); sb.append("identity: ").append(identity.toString()).append(","); sb.append("state: ").append(state).append(","); sb.append("protocol: ").append(protocol).append(","); sb.append("frontend: ").append(frontend.toString()).append(","); sb.append("backend: ").append(backend.toString()); return sb.toString(); } TunnelMeta(DefaultTunnel tunnel, ProxyConnectProtocol protocol);  TunnelMeta(TunnelIdentity identity, String state, String protocol, SessionMeta frontend, SessionMeta backend); TunnelIdentity getIdentity(); TunnelMeta setIdentity(TunnelIdentity identity); String getState(); TunnelMeta setState(String state); String getProtocol(); TunnelMeta setProtocol(String protocol); SessionMeta getFrontend(); TunnelMeta setFrontend(SessionMeta frontend); SessionMeta getBackend(); TunnelMeta setBackend(SessionMeta backend); @Override String toString();  }
@Test public void testToString() { SessionMeta frontend = new SessionMeta(SESSION_TYPE.FRONTEND.name(), "frontend channel", newProxyEndpoint(true, false).getUri(), new SessionEstablished(null).name()); SessionMeta backend = new SessionMeta(SESSION_TYPE.FRONTEND.name(), "backend channel", newProxyEndpoint(true, false).getUri(), new SessionInit(null).name()); TunnelMeta meta = new TunnelMeta(new TunnelIdentity(new EmbeddedChannel(), "ABC_DEF", "source"), new TunnelHalfEstablished(null).name(), protocol().getContent(), frontend, backend); logger.info("[testToString] {}", meta.toString()); }