#include "google_apis/google_api_keys_unittest.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "base/version_info/channel.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "google_apis/api_key_cache.h"
#include "google_apis/default_api_keys.h"
#include "google_apis/gaia/gaia_config.h"
#include "google_apis/gaia/gaia_switches.h"
#include "google_apis/google_api_keys.h"
GoogleAPIKeysTest::GoogleAPIKeysTest() : env_(base::Environment::Create()) {
static_assert(9 == 3 + 2 * google_apis::CLIENT_NUM_ITEMS,
"Unexpected number of key entries.");
env_cache_[0].variable_name = "GOOGLE_API_KEY";
env_cache_[1].variable_name = "GOOGLE_CLIENT_ID_MAIN";
env_cache_[2].variable_name = "GOOGLE_CLIENT_SECRET_MAIN";
env_cache_[3].variable_name = "GOOGLE_CLIENT_ID_REMOTING";
env_cache_[4].variable_name = "GOOGLE_CLIENT_SECRET_REMOTING";
env_cache_[5].variable_name = "GOOGLE_CLIENT_ID_REMOTING_HOST";
env_cache_[6].variable_name = "GOOGLE_CLIENT_SECRET_REMOTING_HOST";
env_cache_[7].variable_name = "GOOGLE_DEFAULT_CLIENT_ID";
env_cache_[8].variable_name = "GOOGLE_DEFAULT_CLIENT_SECRET";
}
GoogleAPIKeysTest::~GoogleAPIKeysTest() {}
void GoogleAPIKeysTest::SetUp() {
for (size_t i = 0; i < std::size(env_cache_); ++i) {
EnvironmentCache& cache = env_cache_[i];
cache.was_set = env_->HasVar(cache.variable_name);
cache.value.clear();
if (cache.was_set) {
cache.value = env_->GetVar(cache.variable_name).value();
env_->UnSetVar(cache.variable_name);
}
}
}
void GoogleAPIKeysTest::TearDown() {
for (size_t i = 0; i < std::size(env_cache_); ++i) {
EnvironmentCache& cache = env_cache_[i];
if (cache.was_set) {
env_->SetVar(cache.variable_name, cache.value);
}
}
}
base::FilePath GetTestFilePath(const std::string& relative_path) {
base::FilePath path;
if (!base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path)) {
return base::FilePath();
}
return path.AppendASCII("google_apis")
.AppendASCII("test")
.AppendASCII("data")
.AppendASCII("gaia")
.AppendASCII(relative_path);
}
#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
namespace official_build {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "bogus api_key"
#define GOOGLE_CLIENT_ID_MAIN "bogus client_id_main"
#undef GOOGLE_APIS_GOOGLE_API_KEYS_H_
#undef GOOGLE_APIS_INTERNAL_GOOGLE_CHROME_API_KEYS_
#undef GOOGLE_APIS_INTERNAL_METRICS_SIGNING_KEY_H_
#include "google_apis/internal/google_chrome_api_keys.h"
#include "google_apis/internal/metrics_signing_key.h"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OfficialKeys) {
google_apis::ApiKeyCache api_key_cache(
official_build::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_TRUE(google_apis::HasOAuthClientConfigured());
std::string api_key = google_apis::GetAPIKey();
std::string id_main =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN);
std::string secret_main =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN);
std::string id_remoting =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
std::string secret_remoting =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
std::string id_remoting_host =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST);
std::string secret_remoting_host =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST);
EXPECT_NE(0u, api_key.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, api_key);
EXPECT_NE("bogus api_key", api_key);
EXPECT_NE(0u, id_main.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, id_main);
EXPECT_NE("bogus client_id_main", id_main);
EXPECT_NE(0u, secret_main.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, secret_main);
EXPECT_NE(0u, id_remoting.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, id_remoting);
EXPECT_NE(0u, secret_remoting.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting);
EXPECT_NE(0u, id_remoting_host.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, id_remoting_host);
EXPECT_NE(0u, secret_remoting_host.size());
EXPECT_NE(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting_host);
}
#endif
#undef BUILDFLAG_INTERNAL_CHROMIUM_BRANDING
#undef BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING
#define BUILDFLAG_INTERNAL_CHROMIUM_BRANDING() (1)
#define BUILDFLAG_INTERNAL_GOOGLE_CHROME_BRANDING() (0)
#undef USE_OFFICIAL_GOOGLE_API_KEYS
namespace default_keys {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, DefaultKeys) {
google_apis::ApiKeyCache api_key_cache(
default_keys::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_FALSE(google_apis::HasAPIKeyConfigured());
EXPECT_FALSE(google_apis::HasOAuthClientConfigured());
std::string api_key = google_apis::GetAPIKey();
std::string id_main =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN);
std::string secret_main =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN);
std::string id_remoting =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
std::string secret_remoting =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
std::string id_remoting_host =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST);
std::string secret_remoting_host =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, api_key);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, id_main);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_main);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, id_remoting);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, id_remoting_host);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting_host);
}
namespace override_some_keys {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "API_KEY override"
#define GOOGLE_CLIENT_ID_REMOTING "CLIENT_ID_REMOTING override"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OverrideSomeKeys) {
google_apis::ApiKeyCache api_key_cache(
override_some_keys::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_FALSE(google_apis::HasOAuthClientConfigured());
std::string api_key = google_apis::GetAPIKey();
std::string id_main =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN);
std::string secret_main =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN);
std::string id_remoting =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
std::string secret_remoting =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
std::string id_remoting_host =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST);
std::string secret_remoting_host =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST);
EXPECT_EQ("API_KEY override", api_key);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, id_main);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_main);
EXPECT_EQ("CLIENT_ID_REMOTING override", id_remoting);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, id_remoting_host);
EXPECT_EQ(google_apis::DefaultApiKeys::kUnsetApiToken, secret_remoting_host);
}
namespace override_all_keys {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "API_KEY"
#define GOOGLE_CLIENT_ID_MAIN "ID_MAIN"
#define GOOGLE_CLIENT_SECRET_MAIN "SECRET_MAIN"
#define GOOGLE_CLIENT_ID_REMOTING "ID_REMOTING"
#define GOOGLE_CLIENT_SECRET_REMOTING "SECRET_REMOTING"
#define GOOGLE_CLIENT_ID_REMOTING_HOST "ID_REMOTING_HOST"
#define GOOGLE_CLIENT_SECRET_REMOTING_HOST "SECRET_REMOTING_HOST"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OverrideAllKeys) {
google_apis::ApiKeyCache api_key_cache(
override_all_keys::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_TRUE(google_apis::HasOAuthClientConfigured());
std::string api_key = google_apis::GetAPIKey();
std::string id_main =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN);
std::string secret_main =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN);
std::string id_remoting =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
std::string secret_remoting =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
std::string id_remoting_host =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST);
std::string secret_remoting_host =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST);
EXPECT_EQ("API_KEY", api_key);
EXPECT_EQ("ID_MAIN", id_main);
EXPECT_EQ("SECRET_MAIN", secret_main);
EXPECT_EQ("ID_REMOTING", id_remoting);
EXPECT_EQ("SECRET_REMOTING", secret_remoting);
EXPECT_EQ("ID_REMOTING_HOST", id_remoting_host);
EXPECT_EQ("SECRET_REMOTING_HOST", secret_remoting_host);
}
#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
namespace override_all_keys_env {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "API_KEY"
#define GOOGLE_CLIENT_ID_MAIN "ID_MAIN"
#define GOOGLE_CLIENT_SECRET_MAIN "SECRET_MAIN"
#define GOOGLE_CLIENT_ID_REMOTING "ID_REMOTING"
#define GOOGLE_CLIENT_SECRET_REMOTING "SECRET_REMOTING"
#define GOOGLE_CLIENT_ID_REMOTING_HOST "ID_REMOTING_HOST"
#define GOOGLE_CLIENT_SECRET_REMOTING_HOST "SECRET_REMOTING_HOST"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OverrideAllKeysUsingEnvironment) {
std::unique_ptr<base::Environment> env(base::Environment::Create());
env->SetVar("GOOGLE_API_KEY", "env-API_KEY");
env->SetVar("GOOGLE_CLIENT_ID_MAIN", "env-ID_MAIN");
env->SetVar("GOOGLE_CLIENT_ID_REMOTING", "env-ID_REMOTING");
env->SetVar("GOOGLE_CLIENT_ID_REMOTING_HOST", "env-ID_REMOTING_HOST");
env->SetVar("GOOGLE_CLIENT_SECRET_MAIN", "env-SECRET_MAIN");
env->SetVar("GOOGLE_CLIENT_SECRET_REMOTING", "env-SECRET_REMOTING");
env->SetVar("GOOGLE_CLIENT_SECRET_REMOTING_HOST", "env-SECRET_REMOTING_HOST");
google_apis::ApiKeyCache api_key_cache(
override_all_keys_env::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_TRUE(google_apis::HasOAuthClientConfigured());
std::string api_key = google_apis::GetAPIKey();
std::string id_main =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN);
std::string secret_main =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN);
std::string id_remoting =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
std::string secret_remoting =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
std::string id_remoting_host =
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST);
std::string secret_remoting_host =
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST);
EXPECT_EQ("env-API_KEY", api_key);
EXPECT_EQ("env-ID_MAIN", id_main);
EXPECT_EQ("env-SECRET_MAIN", secret_main);
EXPECT_EQ("env-ID_REMOTING", id_remoting);
EXPECT_EQ("env-SECRET_REMOTING", secret_remoting);
EXPECT_EQ("env-ID_REMOTING_HOST", id_remoting_host);
EXPECT_EQ("env-SECRET_REMOTING_HOST", secret_remoting_host);
}
#endif
#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
namespace override_all_keys_setters {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "API_KEY"
#define GOOGLE_CLIENT_ID_MAIN "ID_MAIN"
#define GOOGLE_CLIENT_SECRET_MAIN "SECRET_MAIN"
#define GOOGLE_CLIENT_ID_REMOTING "ID_REMOTING"
#define GOOGLE_CLIENT_SECRET_REMOTING "SECRET_REMOTING"
#define GOOGLE_CLIENT_ID_REMOTING_HOST "ID_REMOTING_HOST"
#define GOOGLE_CLIENT_SECRET_REMOTING_HOST "SECRET_REMOTING_HOST"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OverrideAllKeysUsingSetters) {
google_apis::ApiKeyCache api_key_cache(
override_all_keys_setters::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
std::string api_key("setter-API_KEY");
std::string client_id("setter-CLIENT_ID");
std::string client_secret("setter-CLIENT_SECRET");
google_apis::InitializeAndOverrideAPIKeyAndOAuthClient(api_key, client_id,
client_secret);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_TRUE(google_apis::HasOAuthClientConfigured());
EXPECT_EQ(api_key, google_apis::GetAPIKey(::version_info::Channel::STABLE));
EXPECT_EQ(api_key, google_apis::GetAPIKey());
EXPECT_EQ(client_id,
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN));
EXPECT_EQ(client_secret,
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN));
EXPECT_EQ(client_id,
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING));
EXPECT_EQ(client_secret,
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING));
EXPECT_EQ(client_id,
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST));
EXPECT_EQ(client_secret, google_apis::GetOAuth2ClientSecret(
google_apis::CLIENT_REMOTING_HOST));
}
#endif
namespace override_all_keys_config {
#undef GOOGLE_API_KEY
#undef GOOGLE_CLIENT_ID_MAIN
#undef GOOGLE_CLIENT_SECRET_MAIN
#undef GOOGLE_CLIENT_ID_REMOTING
#undef GOOGLE_CLIENT_SECRET_REMOTING
#undef GOOGLE_CLIENT_ID_REMOTING_HOST
#undef GOOGLE_CLIENT_SECRET_REMOTING_HOST
#undef GOOGLE_DEFAULT_CLIENT_ID
#undef GOOGLE_DEFAULT_CLIENT_SECRET
#define GOOGLE_API_KEY "API_KEY"
#define GOOGLE_CLIENT_ID_MAIN "ID_MAIN"
#define GOOGLE_CLIENT_SECRET_MAIN "SECRET_MAIN"
#define GOOGLE_CLIENT_ID_REMOTING "ID_REMOTING"
#define GOOGLE_CLIENT_SECRET_REMOTING "SECRET_REMOTING"
#define GOOGLE_CLIENT_ID_REMOTING_HOST "ID_REMOTING_HOST"
#define GOOGLE_CLIENT_SECRET_REMOTING_HOST "SECRET_REMOTING_HOST"
#include "google_apis/default_api_keys-inc.cc"
}
TEST_F(GoogleAPIKeysTest, OverrideAllKeysUsingConfig) {
auto command_line = std::make_unique<base::test::ScopedCommandLine>();
command_line->GetProcessCommandLine()->AppendSwitchPath(
"gaia-config", GetTestFilePath("api_keys.json"));
GaiaConfig::ResetInstanceForTesting();
google_apis::ApiKeyCache api_key_cache(
override_all_keys_config::GetDefaultApiKeysFromDefinedValues());
auto scoped_override =
google_apis::SetScopedApiKeyCacheForTesting(&api_key_cache);
EXPECT_TRUE(google_apis::HasAPIKeyConfigured());
EXPECT_TRUE(google_apis::HasOAuthClientConfigured());
EXPECT_EQ("config-API_KEY",
google_apis::GetAPIKey(version_info::Channel::STABLE));
EXPECT_EQ("config-API_KEY", google_apis::GetAPIKey());
EXPECT_EQ("config-ID_MAIN",
google_apis::GetOAuth2ClientID(google_apis::CLIENT_MAIN));
EXPECT_EQ("config-SECRET_MAIN",
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_MAIN));
EXPECT_EQ("config-ID_REMOTING",
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING));
EXPECT_EQ("config-SECRET_REMOTING",
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING));
EXPECT_EQ("config-ID_REMOTING_HOST",
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING_HOST));
EXPECT_EQ(
"config-SECRET_REMOTING_HOST",
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING_HOST));
command_line.reset();
GaiaConfig::ResetInstanceForTesting();
}