Stopping the monitor before changing the master is the closest thing to an instant master switch.
The test case verifies that the router behaves in the expected manner with regards to transaction state and type, autocommit state and statement type.