CacheConfig { public RegionConfig findRegionConfiguration(String regionPath) { if (regionPath.startsWith(Region.SEPARATOR)) { regionPath = regionPath.substring(1); } List<RegionConfig> regions = getRegions(); RegionConfig found = null; for (String regionToken : regionPath.split(Region.SEPARATOR)) { found = Identifiable.find(regions, regionToken); if (found == null) { return null; } regions = found.getRegions(); } return found; } CacheConfig();  CacheConfig(String version); CacheTransactionManagerType getCacheTransactionManager(); void setCacheTransactionManager(CacheTransactionManagerType value); DynamicRegionFactoryType getDynamicRegionFactory(); void setDynamicRegionFactory(DynamicRegionFactoryType value); List<GatewayHub> getGatewayHubs(); List<GatewaySender> getGatewaySenders(); GatewayReceiverConfig getGatewayReceiver(); void setGatewayReceiver(GatewayReceiverConfig value); DeclarableType getGatewayConflictResolver(); void setGatewayConflictResolver(DeclarableType value); List<AsyncEventQueue> getAsyncEventQueues(); List<CacheServer> getCacheServers(); List<PoolType> getPools(); List<DiskStoreType> getDiskStores(); PdxType getPdx(); void setPdx(PdxType value); List<RegionAttributesType> getRegionAttributes(); List<JndiBindingsType.JndiBinding> getJndiBindings(); List<RegionConfig> getRegions(); FunctionServiceType getFunctionService(); void setFunctionService(FunctionServiceType value); ResourceManagerType getResourceManager(); void setResourceManager(ResourceManagerType value); SerializationRegistrationType getSerializationRegistration(); void setSerializationRegistration(SerializationRegistrationType value); List<String> getBackups(); DeclarableType getInitializer(); void setInitializer(DeclarableType value); List<CacheElement> getCustomCacheElements(); Boolean isCopyOnRead(); void setCopyOnRead(Boolean value); Boolean isIsServer(); void setIsServer(Boolean value); String getLockTimeout(); void setLockTimeout(String value); String getLockLease(); void setLockLease(String value); String getMessageSyncInterval(); void setMessageSyncInterval(String value); String getSearchTimeout(); void setSearchTimeout(String value); String getVersion(); void setVersion(String value); RegionConfig findRegionConfiguration(String regionPath); List<T> findCustomCacheElements(Class<T> classT); T findCustomCacheElement(String elementId, Class<T> classT); List<T> findCustomRegionElements(String regionPath,
      Class<T> classT); T findCustomRegionElement(String regionPath, String elementId,
      Class<T> classT); @Deprecated
  static final String SEPARATOR; }
@Test public void findRegionConfiguration() throws Exception { CacheConfig config = new CacheConfig(); assertThat(config.findRegionConfiguration(SEPARATOR + "test")).isNull(); assertThat(config.findRegionConfiguration("test")).isNull(); assertThat(config.findRegionConfiguration("test" + SEPARATOR + "test1")).isNull(); RegionConfig testRegion = new RegionConfig(); testRegion.setName("test"); config.getRegions().add(testRegion); assertThat(config.findRegionConfiguration(SEPARATOR + "test")).isNotNull(); assertThat(config.findRegionConfiguration("test")).isNotNull(); assertThat(config.findRegionConfiguration("test" + SEPARATOR + "test1")).isNull(); RegionConfig test1Region = new RegionConfig(); test1Region.setName("test1"); testRegion.getRegions().add(test1Region); assertThat(config.findRegionConfiguration(SEPARATOR + "test")).isNotNull() .extracting(RegionConfig::getName).isEqualTo("test"); assertThat(config.findRegionConfiguration("test")).isNotNull() .extracting(RegionConfig::getName).isEqualTo("test"); assertThat(config.findRegionConfiguration("test" + SEPARATOR + "test1")).isNotNull() .extracting(RegionConfig::getName).isEqualTo("test1"); }