docs: public synchronized void transition(State newState) throws IllegalStateException {
          if (transitions.containsEntry(currentState, newState)) {
              currentState = newState;
          } else {
              throw new IllegalStateException(String.format(Locale.US,
                      "Attempted invalid transition from %s to %s", currentState, newState));
          }
      }