public class TestTempFramework extends BaseClassForTests
{
@Test
public void testBasic() throws Exception
{
CuratorTempFramework client = CuratorFrameworkFactory.builder().connectString(server.getConnectString()).retryPolicy(new RetryOneTime(1)).buildTemp();
try
{
client.inTransaction().create().forPath("/foo", "data".getBytes()).and().commit();
byte[] bytes = client.getData().forPath("/foo");
Assert.assertEquals(bytes, "data".getBytes());
}
finally
{
CloseableUtils.closeQuietly(client);