Added switch-case for enum support with test case