test coverage for onenter_state_