improve test coverage for enum cast