@Test public void shouldOverrideDefaultSSLContextByDefault() throws Exception { System.clearProperty("javax.net.ssl.keyStore"); SlaveConnectionManager instance = SlaveConnectionManager.getInstance(); assertNotEquals(defaultContext, SSLContext.getDefault()); }
@Test public void shouldNotOverrideDefaultSSLContextIfKeystoreIsSet() throws Exception { System.setProperty("javax.net.ssl.keyStore", "NONE"); SlaveConnectionManager instance = SlaveConnectionManager.getInstance(); assertEquals(defaultContext, SSLContext.getDefault()); }
@Before public void setUp() throws Exception { SlaveConnectionManager.reset(); defaultContext = SSLContext.getDefault(); }