def METHOD_NAME(flag, test_val, default_val):
  """Verifies that the given flag is affected by the corresponding env var."""
  env_var = 'GTEST_' + flag.upper()
  SetEnvVar(env_var, test_val)
  AssertEq(test_val, GetFlag(flag))
  SetEnvVar(env_var, None)
  AssertEq(default_val, GetFlag(flag))