final RetryLoop retryLoop = mock(RetryLoop.class);
when(retryLoop.shouldContinue()).thenReturn(false);
final CuratorZookeeperClient czkClient = mock(CuratorZookeeperClient.class);
when(czkClient.newRetryLoop()).thenReturn(retryLoop);
when(curator.getZookeeperClient()).thenReturn(czkClient);
@SuppressWarnings("unchecked")
final Listenable<ConnectionStateListener> mockListener =