EnvUtil { public static boolean isRunningOnAppEngineProd() { String property = System.getProperty(ENV_APPENGINE_RUNTIME); return property != null && property.equals(ENV_APPENGINE_PROD); }  static void recoverAppEngineRuntime(); static boolean isRunningOnAppEngine(); static boolean isRunningOnAppEngineProd(); static final String ENV_APPENGINE_RUNTIME; static final String ENV_APPENGINE_PROD; static final String DEFAULT_VERSION_HOSTNAME; }
@Test public void testIsRunningOnAppEngineProd() { SystemProperty.environment.set(SystemProperty.Environment.Value.Production); assertTrue(EnvUtil.isRunningOnAppEngineProd()); SystemProperty.environment.set(SystemProperty.Environment.Value.Development); assertFalse(EnvUtil.isRunningOnAppEngineProd()); System.clearProperty(EnvUtil.ENV_APPENGINE_RUNTIME); assertFalse(EnvUtil.isRunningOnAppEngineProd()); }