/// <summary>
            ///     Sets the superstate that the configured state is a substate of.
            /// </summary>
            /// <remarks>
            ///     Substates inherit the allowed transitions of their superstate.
            ///     When entering directly into a substate from outside of the superstate,
            ///     entry actions for the superstate are executed.
            ///     Likewise when leaving from the substate to outside the supserstate,
            ///     exit actions for the superstate will execute.
            /// </remarks>
            /// <param name="superstate">The superstate.</param>
            /// <returns>The receiver.</returns>
            public StateConfiguration SubstateOf(TState superstate)
            {
                StateRepresentation superRepresentation = _lookup(superstate);

                _representation.Superstate = superRepresentation;
                superRepresentation.AddSubstate(_representation);
                return(this);
            }