it would be sufficient just to look into the settings or pref database before or after to check that it has changed the setting.

Using the external carrier service is potentially unreliable, sometimes the messages don't arrive quickly. that would lead to false negatives with this test.