Complete FSM rules.
Create test.