PaxosRemotingUtils { public static String addProtocol(TimeLockInstallConfiguration install, String address) { String protocolPrefix = getSslConfigurationOptional(install).isPresent() ? "https: return protocolPrefix + address; } private  PaxosRemotingUtils(); static int getQuorumSize(Collection<T> elements); static List<String> getRemoteServerPaths(TimeLockInstallConfiguration install); static ImmutableList<String> getClusterAddresses(TimeLockInstallConfiguration install); static List<String> getRemoteServerAddresses(TimeLockInstallConfiguration install); static ClusterConfiguration getClusterConfiguration(TimeLockInstallConfiguration install); static Optional<SslConfiguration> getSslConfigurationOptional(TimeLockInstallConfiguration install); static String addProtocol(TimeLockInstallConfiguration install, String address); static List<String> addProtocols(TimeLockInstallConfiguration install, List<String> addresses); static URL convertAddressToUrl(TimeLockInstallConfiguration install, String address); static List<URL> convertAddressesToUrls(TimeLockInstallConfiguration install, List<String> addresses);  }
@Test public void addProtocolAddsHttpIfSslNotPresent() { assertThat(PaxosRemotingUtils.addProtocol(NO_SSL_TIMELOCK, "atlasdb:1234")).isEqualTo("http: }
@Test public void addProtocolAddsHttpsIfSslPresent() { assertThat(PaxosRemotingUtils.addProtocol(SSL_TIMELOCK, "atlasdb:1234")).isEqualTo("https: }