### Question:
IRODSSession { public synchronized X509TrustManager getX509TrustManager() { return x509TrustManager; } IRODSSession(final JargonProperties jargonProperties);  IRODSSession();  IRODSSession(final IRODSProtocolManager irodsConnectionManager); synchronized X509TrustManager getX509TrustManager(); synchronized void setX509TrustManager(final X509TrustManager x509TrustManager); JargonProperties getJargonProperties(); TransferControlBlock buildDefaultTransferControlBlockBasedOnJargonProperties(); PipelineConfiguration buildPipelineConfigurationBasedOnJargonProperties(); TransferOptions buildTransferOptionsBasedOnJargonProperties(); void closeSession(); static IRODSSession instance(final IRODSProtocolManager irodsProtocolHandler); IRODSMidLevelProtocol currentConnection(final IRODSAccount irodsAccount); IRODSMidLevelProtocol currentConnectionCheckRenewalOfSocket(final IRODSAccount irodsAccount); void closeSession(final IRODSAccount irodsAccount); void discardSessionForErrors(final IRODSAccount irodsAccount); Map<String, IRODSMidLevelProtocol> getIRODSCommandsMap(); IRODSProtocolManager getIrodsProtocolManager(); void setIrodsProtocolManager(final IRODSProtocolManager irodsProtocolManager); ExecutorService getParallelTransferThreadPool(); void setJargonProperties(final JargonProperties jargonProperties); DiscoveredServerPropertiesCache getDiscoveredServerPropertiesCache(); boolean isUsingDynamicServerPropertiesCache(); LocalChecksumComputerFactory getLocalChecksumComputerFactory(); synchronized AbstractRestartManager getRestartManager(); synchronized void setRestartManager(final AbstractRestartManager restartManager); static final ThreadLocal<Map<String, IRODSMidLevelProtocol>> sessionMap; }### Answer:
@Test public final void testInitTrustAllTrustManager() throws Exception { SettableJargonPropertiesMBean settableJargonProperties = new SettableJargonProperties(); settableJargonProperties.setBypassSslCertChecks(true); IRODSSession irodsSession = new IRODSSession(settableJargonProperties); Assert.assertTrue("did't set trust all", irodsSession.getX509TrustManager() instanceof TrustAllX509TrustManager); }
@Test public final void testInitNoTrustAllTrustManager() throws Exception { SettableJargonPropertiesMBean settableJargonProperties = new SettableJargonProperties(); settableJargonProperties.setBypassSslCertChecks(false); IRODSSession irodsSession = new IRODSSession(settableJargonProperties); Assert.assertNull(irodsSession.getX509TrustManager()); }