Write test for switch modules