ConfigUtil { public int getRefreshInterval() { return refreshInterval; } ConfigUtil(); String getAppId(); String getAccessKeySecret(); String getDataCenter(); String getCluster(); Env getApolloEnv(); String getLocalIp(); String getMetaServerDomainName(); int getConnectTimeout(); int getReadTimeout(); int getRefreshInterval(); TimeUnit getRefreshIntervalTimeUnit(); int getLoadConfigQPS(); int getLongPollQPS(); long getOnErrorRetryInterval(); TimeUnit getOnErrorRetryIntervalTimeUnit(); String getDefaultLocalCacheDir(); boolean isInLocalMode(); boolean isOSWindows(); long getMaxConfigCacheSize(); long getConfigCacheExpireTime(); TimeUnit getConfigCacheExpireTimeUnit(); long getLongPollingInitialDelayInMills(); boolean isAutoUpdateInjectedSpringPropertiesEnabled(); boolean isPropertiesOrderEnabled();  }
@Test public void testCustomizeRefreshInterval() throws Exception { int someRefreshInterval = 1; System.setProperty("apollo.refreshInterval", String.valueOf(someRefreshInterval)); ConfigUtil configUtil = new ConfigUtil(); assertEquals(someRefreshInterval, configUtil.getRefreshInterval()); }
@Test public void testCustomizeInvalidRefreshInterval() throws Exception { String someInvalidRefreshInterval = "a"; System.setProperty("apollo.refreshInterval", someInvalidRefreshInterval); ConfigUtil configUtil = new ConfigUtil(); assertTrue(configUtil.getRefreshInterval() > 0); }