### Question:
PathImpl implements Path, Serializable { public static PathImpl createPathFromString(String propertyPath) { if (propertyPath == null || propertyPath.isEmpty()) { return create(); } return PathNavigation.navigateAndReturn(propertyPath, new Builder()); } private  PathImpl(); private  PathImpl(Iterable<? extends Node> nodes); static PathImpl createPathFromString(String propertyPath); static PathImpl create(); static PathImpl copy(Path path); static PathImpl of(Path path); boolean isRootPath(); PathImpl addNode(Node node); PathImpl addProperty(String name); PathImpl addBean(); NodeImpl removeLeafNode(); NodeImpl getLeafNode(); @Override Iterator<Path.Node> iterator(); boolean isSubPathOf(Path path); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final Comparator<Path> PATH_COMPARATOR; }### Answer:
@Test(expected = ValidationException.class) public void testUnbalancedBraces() { PathImpl.createPathFromString("foo[.bar"); }
@Test(expected = ValidationException.class) public void testIndexInMiddleOfProperty() { PathImpl.createPathFromString("f[1]oo.bar"); }
@Test(expected = ValidationException.class) public void testTrailingPathSeparator() { PathImpl.createPathFromString("foo.bar."); }
@Test(expected = ValidationException.class) public void testLeadingPathSeparator() { PathImpl.createPathFromString(".foo.bar"); }