HTTP2Customizer implements Customizer { @Override public void customize() { if (!supportsHTTP2()) { SwarmMessages.MESSAGES.http2NotSupported(); return; } for (Server server : undertow.subresources().servers()) { server.subresources().httpsListeners().forEach(httpsListener -> httpsListener.enableHttp2(true)); } }  @Override void customize(); static final String REQUIRED_CIPHER; static final String REQUIRED_CIPHER_IBMJDK; }
@Test public void testHTTP2Enabled() { HTTP2Customizer customizer = new HTTP2Customizer(); customizer.undertow = new UndertowFraction().applyDefaults(); Server server = customizer.undertow.subresources().server(UndertowProperties.DEFAULT_SERVER); AtomicReference<HttpsListener> listener = new AtomicReference<>(); server.httpsListener("default-https", (config) -> { listener.set(config); }); assertThat(listener.get()).isNotNull(); assertThat(listener.get().enableHttp2()).isNull(); customizer.customize(); assertThat(listener.get().enableHttp2()).isTrue(); }