DefaultTunnelManager implements TunnelManager { @Override public void update(Object args, Observable observable) { if(!(observable instanceof Tunnel)) { logger.error("[update] should observe tunnel only, not {}", observable.getClass().getName()); return; } DefaultTunnel tunnel = (DefaultTunnel) observable; if(!(args instanceof TunnelStateChangeEvent)) { return; } TunnelStateChangeEvent event = (TunnelStateChangeEvent) args; if(event.getCurrent() instanceof TunnelClosed) { logger.info("[update] tunnel closed, remove from tunnel manager"); remove(tunnel.frontendChannel()); } }  @PostConstruct void cleaner(); @PreDestroy void preDestroy(); @Override Tunnel create(Channel frontendChannel, ProxyConnectProtocol protocol); @Override void remove(Channel frontendChannel); @Override List<Tunnel> tunnels(); @Override Tunnel getById(String id); @Override void release(); @Override void update(Object args, Observable observable); @VisibleForTesting DefaultTunnelManager setConfig(ProxyConfig config); @VisibleForTesting DefaultTunnelManager setProxyResourceManager(ResourceManager manager); DefaultTunnelManager setTunnelMonitorManager(TunnelMonitorManager tunnelMonitorManager);  }
@Test public void update() { }