I love state machines because they have systematic ways to test it but i would like to discuss some philosophies with you.
Referring to the upper state machine, Suppose that we always start a state BED,
What is the best way to test the transitions from HOME ?
Method #1 : Access the state variable and set it directly to HOME and then preform the test
Method #2 : Initialize the state variable to its default state and trigger WAKE event to be in HOME state and then perform the test?
What method do you use and why? And if we can start at any state, What is the best method to use?