code: private void verifyAndSetForkState(ForkState expectedState, ForkState newState) {
      if (!compareAndSetForkState(expectedState, newState)) {
        throw new IllegalStateException(String
            .format("Expected fork state %s; actual fork state %s", expectedState.name(), this.forkState.get().name()));
      }
    }
docs: Compare and set the state of this {@link Fork} to a new state if and only if the current state
  is equal to the expected state. Throw an exception if the state did not match.