Updated state machine test. Also added coverage for all tests.