}
//some of the examples from the 1.0 bean validation spec, section 4.2
public void testSpecExamples() {
String fourthAuthor = "authors[3]";
Path path = PathImpl.createPathFromString(fourthAuthor);
Iterator<Path.Node> propIter = path.iterator();
assertTrue(propIter.hasNext());
Path.Node elem = propIter.next();
assertFalse(elem.isInIterable());
assertEquals("authors", elem.getName());
assertTrue(propIter.hasNext());
elem = propIter.next();
assertTrue(elem.isInIterable());
assertEquals(3, elem.getIndex().intValue());
assertNull(elem.getName());
assertFalse(propIter.hasNext());
String firstAuthorCompany = "authors[0].company";
path = PathImpl.createPathFromString(firstAuthorCompany);
propIter = path.iterator();
assertTrue(propIter.hasNext());
elem = propIter.next();
assertFalse(elem.isInIterable());
assertEquals("authors", elem.getName());