@Override
    public Iterator<Part> iterator() {
        return Iterators.unmodifiableIterator(parts.iterator());
    }
@Test
    public void testBasic() {
        UriSpec spec = new UriSpec("{one}{two}three-four-five{six}seven{eight}");
        Iterator<UriSpec.Part> iterator = spec.iterator();
        checkPart(iterator.next(), "one", true);
        checkPart(iterator.next(), "two", true);
        checkPart(iterator.next(), "three-four-five", false);
        checkPart(iterator.next(), "six", true);
        checkPart(iterator.next(), "seven", false);
        checkPart(iterator.next(), "eight", true);
    }