@Test
public void testIterator() {

    // GIVEN
    final String token = "code";
    final SqlScript script = new SqlScript(token);
    // WHEN
    final Iterator<String> it = script.iterator();
    // THEN
    assertThat(it.hasNext(), equalTo(Boolean.TRUE));
    assertThat(it.next(), equalTo(token));
    assertThat(it.hasNext(), equalTo(Boolean.FALSE));
    try {
        it.next();
        fail("NoSuchElementException expected");
    } catch (final NoSuchElementException e) {
        // expected
    }
}