### Question:
RetryLoop { RetryLoop(RetryPolicy retryPolicy, AtomicReference<TracerDriver> tracer) { this.retryPolicy = retryPolicy; this.tracer = tracer; } RetryLoop(RetryPolicy retryPolicy, AtomicReference<TracerDriver> tracer); static RetrySleeper getDefaultRetrySleeper(); static T callWithRetry(CuratorZookeeperClient client, Callable<T> proc); boolean shouldContinue(); void markComplete(); static boolean shouldRetry(int rc); static boolean isRetryException(Throwable exception); void takeException(Exception exception);  }### Answer:
@Test public void testRetryLoop() throws Exception { CuratorZookeeperClient client = new CuratorZookeeperClient(server.getConnectString(), 10000, 10000, null, new RetryOneTime(1)); client.start(); try { int loopCount = 0; RetryLoop retryLoop = client.newRetryLoop(); while ( retryLoop.shouldContinue() ) { if ( ++loopCount > 2 ) { Assert.fail(); break; } try { client.getZooKeeper().create("/test", new byte[]{1,2,3}, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); retryLoop.markComplete(); } catch ( Exception e ) { retryLoop.takeException(e); } } Assert.assertTrue(loopCount > 0); } finally { client.close(); } }