### Question:
UriSpec implements Iterable<UriSpec.Part> { @Override public Iterator<Part> iterator() { return Iterators.unmodifiableIterator(parts.iterator()); } UriSpec();  UriSpec(String rawSpec); String build(); String build(ServiceInstance<?> serviceInstance); String build(Map<String, Object> variables); String build(ServiceInstance<?> serviceInstance, Map<String, Object> variables); @Override Iterator<Part> iterator(); List<Part> getParts(); void add(Part part); void remove(Part part); @SuppressWarnings("RedundantIfStatement") @Override boolean equals(Object o); @Override int hashCode(); static final String FIELD_SCHEME; static final String FIELD_NAME; static final String FIELD_ID; static final String FIELD_ADDRESS; static final String FIELD_PORT; static final String FIELD_SSL_PORT; static final String FIELD_REGISTRATION_TIME_UTC; static final String FIELD_SERVICE_TYPE; static final String FIELD_OPEN_BRACE; static final String FIELD_CLOSE_BRACE; }### Answer:
@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); }