ProtocolNegotiators { public static ProtocolNegotiator serverTls(final SslContext sslContext) { Preconditions.checkNotNull(sslContext, "sslContext"); return new ProtocolNegotiator() { @Override public Handler newHandler(Http2ConnectionHandler handler) { return new ServerTlsHandler(sslContext, handler); } }; } private  ProtocolNegotiators(); static ProtocolNegotiator serverPlaintext(); static ProtocolNegotiator serverTls(final SslContext sslContext); static ProtocolNegotiator tls(SslContext sslContext, String authority); static ProtocolNegotiator plaintextUpgrade(); static ProtocolNegotiator plaintext();  }
@Test public void tlsHandler_failsOnNullEngine() throws Exception { thrown.expect(NullPointerException.class); thrown.expectMessage("ssl"); ProtocolNegotiators.serverTls(null); }