test case for verifying task state transition.