fix tests for switch