Moving the test message patterns to a private method