@Deprecated
    public static ZContext shadow(ZContext ctx)
    {
        return ctx.shadow();
    }
@Test(timeout = 5000)
    public void testShadow()
    {
        ZContext ctx = new ZContext();
        // A socket that will be forgotten at the parent
        Socket s = ctx.createSocket(SocketType.SUB);
        Assert.assertNotNull(s);
        Assert.assertEquals(1, ctx.getSockets().size());
        // A shadow that will be forgotten
        ZContext shadowCtx0 = ctx.shadow();
        // A socket that will be forgotten in a shadow
        @SuppressWarnings("unused")
        Socket s0 = shadowCtx0.createSocket(SocketType.PUB);
        try (ZContext shadowCtx1 = ctx.shadow()) {
            Assert.assertEquals(0, shadowCtx1.getSockets().size());
            try (Socket s1 = shadowCtx1.createSocket(SocketType.PUB)) {
                Assert.assertEquals(1, ctx.getSockets().size());
                Assert.assertEquals(1, shadowCtx1.getSockets().size());
            }
        }
        ctx.close();
        Assert.assertTrue(ctx.isEmpty());
    }