Overload environment constructor so we can hard code the FSM

Prior to this commit the transition table for the state machine was
always genereated randomly. This made unit testing difficult as we
had to deal with a different state machine everytime.

Now, the constructor has bee overloaded so that we can either generate
the transition table randomly or pass in hard coded values.