Don't make changes in Command handler. add event handler on CourseExamStarted and change state there.