@Test public void tokenIsNotAvailableBeforeStartingIteration() throws Exception { final HeaderPartIterator sut = createSut(""); try { sut.part(); fail("Should not retrieve token before starting iteration"); } catch(final IllegalStateException e) { assertThat(e.getMessage(),equalTo("Iteration has not started")); } }
String part() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.part; }
HeaderPartIterator implements Iterator<String> { String part() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.part; } }
HeaderPartIterator implements Iterator<String> { String part() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.part; } private  HeaderPartIterator(final String str); }
HeaderPartIterator implements Iterator<String> { String part() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.part; } private  HeaderPartIterator(final String str); @Override boolean hasNext(); @Override String next(); @Override void remove(); }
HeaderPartIterator implements Iterator<String> { String part() { checkState(this.partStart<this.partEnd,ERROR_ITERATION_HAS_NOT_STARTED); return this.part; } private  HeaderPartIterator(final String str); @Override boolean hasNext(); @Override String next(); @Override void remove();  }