code: private void expect(JsonToken expected) throws IOException {
          peek();
          if (token != expected) {
              throw new IllegalStateException("Expected " + expected + " but was " + peek());
          }
          advance();
      }
docs: Consumes {@code expected}.