- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Gson g =
new Gson()
GsonBuilder gsonBuilder;gsonBuilder.create()
new GsonBuilder().create()
- Smart code suggestions by Codota
}
@Test public void testFirstAlias() { try { SSLContextBuilder.builder() .setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword(KEYSTORE_PASSWORD) .setKeyAlias(KEYSTORE_ALIAS_ONE) .build(); } catch (RuntimeException e) { fail(e.getMessage()); } }
@Test public void testSecondAlias() { try { SSLContextBuilder.builder() .setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword(KEYSTORE_PASSWORD) .setKeyAlias(KEYSTORE_ALIAS_TWO) .build(); } catch (RuntimeException e) { fail(e.getMessage()); } }
.setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword(KEYSTORE_PASSWORD) .setKeyAlias(KEYSTORE_KEYALIAS).build(); undertowBuilder = undertowBuilder.addHttpsListener(portTls, host,
.setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword(KEYSTORE_PASSWORD) .setKeyAlias(KEYSTORE_KEYALIAS).build(); undertowBuilder = undertowBuilder.addHttpsListener(portTls, host,
@Test public void testIncorrectPassword() { try { SSLContextBuilder.builder() .setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword("bla") .setKeyAlias(KEYSTORE_ALIAS_ONE) .build(); // should fail fail("Exception not thrown"); } catch (RuntimeException e) { assertTrue(e.getCause() instanceof IOException); } } }
@Test public void testNonExistingAlias() { try { SSLContextBuilder.builder() .setKeyStorePath(KEYSTORE_PATH) .setKeyStorePassword(KEYSTORE_PASSWORD) .setKeyAlias("bla") .build(); // should fail fail("Exception not thrown"); } catch (RuntimeException e) { assertTrue(e.getCause() instanceof IllegalArgumentException); } }