### Question:
WebSocketSslServerSslContext { public SSLContext sslContext() { try { final SSLContext serverContext = SSLContext.getInstance(PROTOCOL); serverContext.init(keyManagerFactory(loadKeyStore()).getKeyManagers(), null, null); return serverContext; } catch (final Exception e) { throw new RuntimeException("Failed to initialize the server-side SSLContext", e); } } WebSocketSslServerSslContext(final SockJsConfig sockJsConfig); SSLContext sslContext();  }### Answer:
@Test public void createSSLEngine() { final SockJsConfig sockJsConfig = SockJsConfig.withPrefix("/echo") .tls(true) .keyStore("/simplepush-sample.keystore") .keyStorePassword("simplepush") .build(); final SSLEngine engine = new WebSocketSslServerSslContext(sockJsConfig).sslContext().createSSLEngine(); assertThat(engine, is(notNullValue())); }
@Test (expected = RuntimeException.class) public void createSSLContextKeyStoreNotFound() { final SockJsConfig sockJsConfig = SockJsConfig.withPrefix("/echo") .tls(true) .keyStore("/missing.keystore") .keyStorePassword("simplepush") .build(); new WebSocketSslServerSslContext(sockJsConfig).sslContext(); }