public final boolean register(final Socket socket, final BiFunction<Socket, Integer, Boolean> handler,
                                  final int events)
    {
        return register(socket, new ComposeEventsHandler(handler, null), events);
    }
@Test(timeout = 5000)
    public void testRegister()
    {
        ZContext ctx = new ZContext();
        ZPoller poller = new ZPoller(ctx);
        try {
            Socket socket = ctx.createSocket(SocketType.XPUB);
            ItemHolder holder = poller.create(socket, null, 0);
            boolean rc = poller.register(holder);
            assertThat(rc, is(true));
        }
        finally {
            poller.close();
            ctx.close();
        }
    }