private Thread startServerNIO(final ServerSocket serverSocket, int timeoutMillis)
      throws Exception {
    Thread serverThread = new Thread(new MyThreadGroup(testName.getMethodName()), () -> {
      NioSslEngine engine = null;
      Socket socket = null;
      try {
        ByteBuffer buffer = ByteBuffer.allocate(65535);

        socket = serverSocket.accept();
        SocketCreator sc = SocketCreatorFactory.getSocketCreatorForComponent(CLUSTER);
        final SSLEngine sslEngine = sc.createSSLEngine("localhost", 1234, false);
        engine =
            sc.handshakeSSLSocketChannel(socket.getChannel(), sslEngine,
                timeoutMillis,
                ByteBuffer.allocate(65535),
                new BufferPool(mock(DMStats.class)));
        final List<SNIServerName> serverNames = sslEngine.getSSLParameters().getServerNames();
        if (serverNames != null && serverNames.stream()
            .mapToInt(SNIServerName::getType)
            .anyMatch(type -> type == StandardConstants.SNI_HOST_NAME)) {
          serverException = new AssertionError("found SNI server name in SSL Parameters");
          return;
        }

        readMessageFromNIOSSLClient(socket, buffer, engine);
        readMessageFromNIOSSLClient(socket, buffer, engine);
        readMessageFromNIOSSLClient(socket, buffer, engine);
      } catch (Throwable throwable) {
        throwable.printStackTrace(System.out);
        serverException = throwable;
      } finally {
        if (engine != null && socket != null) {
          final NioSslEngine nioSslEngine = engine;
          engine.close(socket.getChannel());
          assertThatThrownBy(() -> {
            try (final ByteBufferSharing unused =
                nioSslEngine.unwrap(ByteBuffer.wrap(new byte[0]))) {
            }
          })
              .isInstanceOf(IOException.class);
        }
      }
    }, testName.getMethodName() + "-server");

    serverThread.start();
    return serverThread;
  }
see GEODE-4087. Geode should not establish a default SSLContext, preventing apps from using
different ssl settings via standard system properties. Since this test class sets these system
properties to establish a default context we merely need to perform an equality check between
the cluster's context and the default context and assert that they aren't the same.
geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java