add test for switch component