Test case for state machine

Created test case for the state machine.