Added some proper tests for FSM, including pooling tests and test with system