Complete unittests for state transition.