test_class.file: filter-service-core/src/test/java/cn/leancloud/filter/service/utils/AbstractIteratorTest.java
test_class.identifier: AbstractIteratorTest
test_case.body: @Test
      public void testMakeNextReturnsNull() {
          final Iterator<Object> iter = new AbstractIterator<Object>() {
              @Nullable
              @Override
              protected Object makeNext() {
                  return null;
              }
          };
  
          assertThat(iter.hasNext()).isTrue();
          assertThatThrownBy(iter::next)
                  .isInstanceOf(IllegalStateException.class)
                  .hasMessage("expected item but none found");
      }
test_case.class_method_signature: AbstractIteratorTest.testMakeNextReturnsNull()
test_case.full_signature: @Test public void testMakeNextReturnsNull()
test_case.identifier: testMakeNextReturnsNull
test_case.invocations: isTrue assertThat hasNext hasMessage isInstanceOf assertThatThrownBy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMakeNextReturnsNull()
focal_class.declarator: state = State.NOT_READY
focal_class.modifier: private
focal_class.original_string: private State state = State.NOT_READY;
focal_class.type: State
focal_class.var_name: state
focal_class.declarator: next
focal_class.modifier: @Nullable
      private
focal_class.original_string: @Nullable
      private T next;
focal_class.type: T
focal_class.var_name: next
focal_class.file: filter-service-core/src/main/java/cn/leancloud/filter/service/utils/AbstractIterator.java
focal_class.identifier: AbstractIterator
focal_class.interfaces: implements Iterator<T>
focal_class.class_method_signature: AbstractIterator.hasNext()
focal_class.full_signature: @Override public boolean hasNext()
focal_class.identifier: hasNext
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasNext()
focal_class.class_method_signature: AbstractIterator.next()
focal_class.full_signature: @Override public T next()
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T next()
focal_class.class_method_signature: AbstractIterator.remove()
focal_class.full_signature: @Override public void remove()
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void remove()
focal_class.class_method_signature: AbstractIterator.peek()
focal_class.full_signature: public T peek()
focal_class.identifier: peek
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T peek()
focal_class.class_method_signature: AbstractIterator.allDone()
focal_class.full_signature: @Nullable protected T allDone()
focal_class.identifier: allDone
focal_class.modifiers: @Nullable protected
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T allDone()
focal_class.class_method_signature: AbstractIterator.makeNext()
focal_class.full_signature: @Nullable protected abstract T makeNext()
focal_class.identifier: makeNext
focal_class.modifiers: @Nullable protected abstract
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T makeNext()
focal_class.class_method_signature: AbstractIterator.maybeComputeNext()
focal_class.full_signature: private Boolean maybeComputeNext()
focal_class.identifier: maybeComputeNext
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Boolean
focal_class.signature: Boolean maybeComputeNext()
focal_method.body: @Override
      public boolean hasNext() {
          switch (state) {
              case FAILED:
                  throw new IllegalStateException("iterator is in failed state");
              case DONE:
                  return false;
              case READY:
                  return true;
              default:
                  return maybeComputeNext();
          }
      }
focal_method.class_method_signature: AbstractIterator.hasNext()
focal_method.full_signature: @Override public boolean hasNext()
focal_method.identifier: hasNext
focal_method.invocations: maybeComputeNext
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean hasNext()