### Question:
InterProcessReadWriteLock { public InterProcessMutex writeLock() { return writeMutex; } InterProcessReadWriteLock(CuratorFramework client, String basePath);  InterProcessReadWriteLock(CuratorFramework client, String basePath, byte[] lockData); InterProcessMutex readLock(); InterProcessMutex writeLock();  }### Answer:
@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); nodeData[0] = 5; lock.writeLock().acquire(); List<String> children = client.getChildren().forPath("/lock"); Assert.assertEquals(1, children.size()); byte dataInZk[] = client.getData().forPath("/lock/" + children.get(0)); Assert.assertNotNull(dataInZk); Assert.assertEquals(new byte[] { 1, 2, 3, 4 }, dataInZk); lock.writeLock().release(); } finally { CloseableUtils.closeQuietly(client); } }