public WriteLock writeLock() {
        return writeMutex;
    }
@Test
    public void testSetNodeData() throws Exception {
        CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));

        try {
            client.start();

            final byte[] nodeData = new byte[] {1, 2, 3, 4};

            InterProcessReadWriteLock lock = new InterProcessReadWriteLock(client, "/lock", nodeData);

            // mutate passed-in node data, lock has made copy
            nodeData[0] = 5;

            lock.writeLock().acquire();

            List<String> children = client.getChildren().forPath("/lock");
            assertEquals(1, children.size());

            byte dataInZk[] = client.getData().forPath("/lock/" + children.get(0));
            assertNotNull(dataInZk);
            assertArrayEquals(new byte[] {1, 2, 3, 4}, dataInZk);

            lock.writeLock().release();
        } finally {
            TestCleanState.closeAndTestClean(client);
        }
    }