ConfigUtil { public long getMaxConfigCacheSize() { return maxConfigCacheSize; } 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 testCustomizeMaxConfigCacheSize() throws Exception { long someCacheSize = 1; System.setProperty("apollo.configCacheSize", String.valueOf(someCacheSize)); ConfigUtil configUtil = new ConfigUtil(); assertEquals(someCacheSize, configUtil.getMaxConfigCacheSize()); }
@Test public void testCustomizeInvalidMaxConfigCacheSize() throws Exception { String someInvalidCacheSize = "a"; System.setProperty("apollo.configCacheSize", someInvalidCacheSize); ConfigUtil configUtil = new ConfigUtil(); assertTrue(configUtil.getMaxConfigCacheSize() > 0); }