ServiceContext { public String getTransferProtocol() { return EnvUtil.isRunningOnAppEngineProd() || !EnvUtil.isRunningOnAppEngine() ? "https" : "http"; } private  ServiceContext(String appHostname, String defaultApiName); static ServiceContext create(); static ServiceContext create(String applicationId, String apiName); static ServiceContext createFromHostname(String hostname, String apiName); String getDefaultApiName(); String getAppHostname(); String getTransferProtocol(); static final String DEFAULT_API_NAME; static final String DEFAULT_APP_NAME; }
@Test public void testGetTransferProtocol() { ServiceContext c = ServiceContext.create(); assertEquals("https", c.getTransferProtocol()); }