@Test public void getSelectedProtocol_alpn() throws Exception { when(platform.getTlsExtensionType()).thenReturn(TlsExtensionType.ALPN_AND_NPN); AndroidNegotiator negotiator = new AndroidNegotiator(platform); FakeAndroidSslSocket androidSock = new FakeAndroidSslSocketAlpn(); String actual = negotiator.getSelectedProtocol(androidSock); assertEquals("h2", actual); }
public String getSelectedProtocol(SSLSocket socket) { return platform.getSelectedProtocol(socket); }
OkHttpProtocolNegotiator { public String getSelectedProtocol(SSLSocket socket) { return platform.getSelectedProtocol(socket); } }
OkHttpProtocolNegotiator { public String getSelectedProtocol(SSLSocket socket) { return platform.getSelectedProtocol(socket); } @VisibleForTesting  OkHttpProtocolNegotiator(Platform platform); }
OkHttpProtocolNegotiator { public String getSelectedProtocol(SSLSocket socket) { return platform.getSelectedProtocol(socket); } @VisibleForTesting  OkHttpProtocolNegotiator(Platform platform); static OkHttpProtocolNegotiator get(); String negotiate(
      SSLSocket sslSocket, String hostname, @Nullable List<Protocol> protocols); String getSelectedProtocol(SSLSocket socket); }
OkHttpProtocolNegotiator { public String getSelectedProtocol(SSLSocket socket) { return platform.getSelectedProtocol(socket); } @VisibleForTesting  OkHttpProtocolNegotiator(Platform platform); static OkHttpProtocolNegotiator get(); String negotiate(
      SSLSocket sslSocket, String hostname, @Nullable List<Protocol> protocols); String getSelectedProtocol(SSLSocket socket);  }