ChannelCloseListener implements org.xnio.ChannelListener<WebSocketChannel> { void remove(ChannelImpl<?, ?> wrapper) { context.remove(wrapper); } ChannelCloseListener(WebSocketContextImpl context); @Override void handleEvent(WebSocketChannel channel);  }
@Test void remove() { var channel = new ChannelImpl<TestWebSocketMessage, TestWebSocketMessage>(null, context, null); context.join(channel, "room1"); assertThat(context.room("room1")).hasSize(1); listener.remove(channel); assertThat(context.room("room1")).isEmpty(); }