Redirect to test_url if preferred_test_mode is enabled.