experiment on FSM, add ScalaTest