Create test.js

test code for the FSM