Add finite machine
Add a toy test using finite machine