### Question:
ZooKeeperUtils { static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; } private  ZooKeeperUtils();  static final Amount<Integer,Time> DEFAULT_ZK_SESSION_TIMEOUT; static final Amount<Integer,Time> DEFAULT_ZK_CONNECTION_TIMEOUT; static final ImmutableList<ACL> OPEN_ACL_UNSAFE; static final ImmutableList<ACL> EVERYONE_READ_CREATOR_ALL; }### Answer:
@Test public void testNormalizingPath() throws Exception { assertEquals("/", ZooKeeperUtils.normalizePath("/")); assertEquals("/foo", ZooKeeperUtils.normalizePath("/foo/")); assertEquals("/foo/bar", ZooKeeperUtils.normalizePath("/foo assertEquals("/foo/bar", ZooKeeperUtils.normalizePath(" assertEquals("/foo/bar", ZooKeeperUtils.normalizePath("/foo/bar/")); assertEquals("/foo/bar", ZooKeeperUtils.normalizePath("/foo/bar assertEquals("/foo/bar", ZooKeeperUtils.normalizePath("/foo/bar")); }
@Test public void testLenientPaths() { assertEquals("/", ZooKeeperUtils.normalizePath(" assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a/group")); assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a/group/")); assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a try { ZooKeeperUtils.normalizePath("a/group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } try { ZooKeeperUtils.normalizePath("/a/./group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } try { ZooKeeperUtils.normalizePath("/a/../group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } }