private StateMachine<StoplightState> BuildStoplight(StoplightState initalState)
        {
            var light = new StateMachine<StoplightState>(initalState);
            light.Valid(StoplightState.Green, StoplightState.Yellow);
            light.Valid(StoplightState.Yellow, StoplightState.Red);

            return light;
        }
        private StateMachine <StoplightState> BuildStoplight(StoplightState initalState)
        {
            var light = new StateMachine <StoplightState>(initalState);

            light.Valid(StoplightState.Green, StoplightState.Yellow);
            light.Valid(StoplightState.Yellow, StoplightState.Red);

            return(light);
        }