@Test
    public void testRemovingSockets() {
        ZContext ctx = new ZContext();
        try {
            Socket s = ctx.createSocket(ZMQ.PUB);
            assertTrue(s != null);
            assertEquals(1, ctx.getSockets().size());

            ctx.destroySocket(s);
            assertEquals(0, ctx.getSockets().size());
        } catch (ZMQException e) {
            System.out.println("ZMQException:" + e.toString());
            assertTrue(false);
        }
        ctx.destroy();
    }