public void userAgentReaper() throws Exception {
final URI uri = new URI("ws://127.0.0.1:" + port + "/simplepush/websocket");
final EventLoopGroup group = new NioEventLoopGroup();
try {
final Bootstrap b = new Bootstrap();
final HttpHeaders customHeaders = new DefaultHttpHeaders();
final WebSocketClientHandler handler = new WebSocketClientHandler(
WebSocketClientHandshakerFactory.newHandshaker(
uri, WebSocketVersion.V13, null, false, customHeaders));
b.group(group).channel(NioSocketChannel.class).handler(new ChannelInitializer<SocketChannel>() {
@Override