code: public boolean isCompatible(SSLSocket socket) {
      if (!tls) {
        return false;
      }
  
      String[] enabledProtocols = socket.getEnabledProtocols();
      boolean requiredProtocolsEnabled = nonEmptyIntersection(tlsVersions, enabledProtocols);
      if (!requiredProtocolsEnabled) {
        return false;
      }
  
      boolean requiredCiphersEnabled;
      if (cipherSuites == null) {
        requiredCiphersEnabled = socket.getEnabledCipherSuites().length > 0;
      } else {
        String[] enabledCipherSuites = socket.getEnabledCipherSuites();
        requiredCiphersEnabled = nonEmptyIntersection(cipherSuites, enabledCipherSuites);
      }
      return requiredCiphersEnabled;
    }
docs: Returns {@code true} if the socket, as currently configured, supports this ConnectionSpec.
  In order for a socket to be compatible the enabled cipher suites and protocols must intersect.
  
  <p>For cipher suites, at least one of the {@link #cipherSuites() required cipher suites} must
  match the socket's enabled cipher suites. If there are no required cipher suites the socket
  must have at least one cipher suite enabled.
  
  <p>For protocols, at least one of the {@link #tlsVersions() required protocols} must match the
  socket's enabled protocols.