DefaultBackendSession extends AbstractSession implements BackendSession { @Override protected void doSetSessionState(SessionState newState) { SessionState oldState = this.sessionState.getAndSet(newState); if(oldState.equals(newState)) { logger.debug("[setSessionState] already session state: {}", oldState); } else { logger.info("[setSessionState] Session state change from {} to {} ({})", oldState, newState, getSessionMeta()); EventMonitor.DEFAULT.logEvent(SESSION_STATE_CHANGE, String.format("%s -> %s(%s)", oldState.toString(), newState.toString(), ChannelUtil.getDesc(getChannel()))); notifyObservers(new SessionStateChangeEvent(oldState, newState)); } } DefaultBackendSession(Tunnel tunnel, EventLoopGroup eventLoopGroup, long trafficReportIntervalMillis,
                                 ResourceManager resourceManager); @Override void sendAfterProtocol(ByteBuf byteBuf); @Override SESSION_TYPE getSessionType(); SessionState getSessionState(); @Override SessionMonitor getSessionMonitor();  }
@Test public void doSetSessionState() { }