final GetChildrenBuilder builder = mock(GetChildrenBuilder.class);
when(curator.getChildren()).thenReturn(builder);
try {
when(builder.forPath(anyString())).thenThrow(
new KeeperException.ConnectionLossException());
} catch (Exception e) {} // never throws
when(curator.newNamespaceAwareEnsurePath(anyString())).thenReturn(mock(EnsurePath.class));
return curator;