docs: public synchronized void checkState(State... requiredStates) throws IllegalStateException {
          for (State requiredState : requiredStates) {
              if (requiredState.equals(currentState)) {
                  return;
              }
          }
          throw new IllegalStateException(String.format(Locale.US,
                  "Expected states %s, but in state %s", Lists.newArrayList(requiredStates), currentState));
      }