@Test
    public void testAddingSockets() {
        // Tests "internal" newSocket method, should not be used outside jzmq itself.
        ZContext ctx = new ZContext();
        try {
            Socket s = ctx.createSocket(ZMQ.PUB);
            assertTrue(s != null);
            assertTrue(s.getType() == ZMQ.PUB);
            Socket s1 = ctx.createSocket(ZMQ.REQ);
            assertTrue(s1 != null);
            assertEquals(2, ctx.getSockets().size());
        } catch (ZMQException e) {
            System.out.println("ZMQException:" + e.toString());
            assertTrue(false);
        }
        ctx.destroy();
    }