### Question:
EnvironmentalInfoAccessor { public IRODSServerProperties getIRODSServerProperties() throws JargonException { log.debug("getting irods server properties"); log.debug("checking for cached properties..."); if (irodsProtocol.getIrodsSession() != null) { IRODSServerProperties cached = irodsProtocol.getIrodsSession().getDiscoveredServerPropertiesCache() .retrieveIRODSServerProperties(irodsProtocol.getIrodsAccount().getHost(), irodsProtocol.getIrodsAccount().getZone()); if (cached != null) { log.debug("returning cached props:{}", cached); return cached; } } Tag response = irodsProtocol.irodsFunction(IRODSConstants.RODS_API_REQ, "", MiscSvrInfo.API_NBR); log.debug("server response obtained"); int serverType = response.getTag(MiscSvrInfo.SERVER_TYPE_TAG).getIntValue(); IRODSServerProperties.IcatEnabled icatEnabled = null; if (serverType == 1) { icatEnabled = IRODSServerProperties.IcatEnabled.ICAT_ENABLED; } else { icatEnabled = IRODSServerProperties.IcatEnabled.NO_ICAT; } int serverBootTime = response.getTag(MiscSvrInfo.SERVER_BOOT_TIME_TAG).getIntValue(); String relVersion = response.getTag(MiscSvrInfo.REL_VERSION_TAG).getStringValue(); String apiVersion = response.getTag(MiscSvrInfo.API_VERSION_TAG).getStringValue(); String rodsZone = response.getTag(MiscSvrInfo.RODS_ZONE_TAG).getStringValue(); IRODSServerProperties props = IRODSServerProperties.instance(icatEnabled, serverBootTime, relVersion, apiVersion, rodsZone); if (irodsProtocol.getIrodsSession() != null) { irodsProtocol.getIrodsSession().getDiscoveredServerPropertiesCache().cacheIRODSServerProperties( irodsProtocol.getIrodsAccount().getHost(), irodsProtocol.getIrodsAccount().getZone(), props); log.debug("cached the props for host and zone:{}", props); } return props; } EnvironmentalInfoAccessor(final IRODSMidLevelProtocol irodsProtocol); IRODSServerProperties getIRODSServerProperties();  }### Answer:
@Test public final void testGetIRODSServerProperties() throws Exception { IRODSProtocolManager irodsConnectionManager = IRODSSimpleProtocolManager.instance(); IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); IRODSSession irodsSession = IRODSSession.instance(irodsConnectionManager); EnvironmentalInfoAccessor target = new EnvironmentalInfoAccessor(irodsSession.currentConnection(irodsAccount)); IRODSServerProperties irodsServerProperties = target.getIRODSServerProperties(); Assert.assertEquals(testingProperties.getProperty(TestingPropertiesHelper.IRODS_ZONE_KEY), irodsServerProperties.getRodsZone()); }