SocketInternetObservingStrategy implements InternetObservingStrategy { protected String adjustHost(final String host) { if (host.startsWith(HTTP_PROTOCOL)) { return host.replace(HTTP_PROTOCOL, EMPTY_STRING); } else if (host.startsWith(HTTPS_PROTOCOL)) { return host.replace(HTTPS_PROTOCOL, EMPTY_STRING); } 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 shouldNotTransformHost() { String transformedHost = strategy.adjustHost(HOST_WITHOUT_HTTP); assertThat(transformedHost).isEqualTo(HOST_WITHOUT_HTTP); }
@Test public void shouldRemoveHttpProtocolFromHost() { String transformedHost = strategy.adjustHost(HOST_WITH_HTTP); assertThat(transformedHost).isEqualTo(HOST_WITHOUT_HTTP); }
@Test public void shouldRemoveHttpsProtocolFromHost() { String transformedHost = strategy.adjustHost(HOST_WITH_HTTP); assertThat(transformedHost).isEqualTo(HOST_WITHOUT_HTTP); }