Add tests for switching message sources in tests

See gh-1075