@Override
        protected TrustManager[] engineGetTrustManagers() {
            return new TrustManager[] {
                    new X509TrustManager() {
                        @Override
                        public void checkClientTrusted(X509Certificate[] chain, String authType) {}

                        @Override
                        public void checkServerTrusted(X509Certificate[] chain, String authType) {
                            actualKeyName.set(chain[0].getSubjectX500Principal().getName());
                        }

                        @Override
                        public X509Certificate[] getAcceptedIssuers() {
                            return EMPTY_CERTIFICATES;
                        }
                    }
            };
        }
Makes sure the specified certificate is selected.
spring/boot3-webflux-autoconfigure/src/test/java/com/linecorp/armeria/spring/web/reactive/AbstractReactiveWebServerCustomKeyAliasTest.java