Implemented testSwitch()