WalledGardenInternetObservingStrategy implements InternetObservingStrategy { protected String adjustHost(final String host) { if (!host.startsWith(HTTP_PROTOCOL) && !host.startsWith(HTTPS_PROTOCOL)) { return HTTPS_PROTOCOL.concat(host); } return host; }  @Override String getDefaultPingHost(); @Override Observable<Boolean> observeInternetConnectivity(final int initialIntervalInMs,
      final int intervalInMs, final String host, final int port, final int timeoutInMs,
      final int httpResponse,
      final ErrorHandler errorHandler); @Override Single<Boolean> checkInternetConnectivity(final String host, final int port,
      final int timeoutInMs, final int httpResponse, final ErrorHandler errorHandler);  }
@Test public void shouldNotTransformHttpHost() { String transformedHost = strategy.adjustHost(HOST_WITH_HTTPS); assertThat(transformedHost).isEqualTo(HOST_WITH_HTTPS); }
@Test public void shouldNotTransformHttpsHost() { String transformedHost = strategy.adjustHost(HOST_WITH_HTTPS); assertThat(transformedHost).isEqualTo(HOST_WITH_HTTPS); }
@Test public void shouldAddHttpsProtocolToHost() { String transformedHost = strategy.adjustHost(HOST_WITHOUT_HTTPS); assertThat(transformedHost).isEqualTo(HOST_WITH_HTTPS); }