InternalRegionFactory extends RegionFactory<K, V> { @Override @SuppressWarnings("unchecked") public Region<K, V> createSubregion(Region<?, ?> parent, String name) throws RegionExistsException { if (internalRegionArguments == null) { return super.createSubregion(parent, name); } try { return ((InternalRegion) parent).createSubregion(name, getRegionAttributes(), internalRegionArguments); } catch (IOException | ClassNotFoundException e) { throw new InternalGemFireError("unexpected exception", e); } } InternalRegionFactory(InternalCache cache);  InternalRegionFactory(InternalCache cache, RegionShortcut pra);  InternalRegionFactory(InternalCache cache, RegionAttributes<K, V> ra);  InternalRegionFactory(InternalCache cache, String regionAttributesId);  InternalRegionFactory(RegionFactory<K, V> regionFactory); RegionAttributes<K, V> getCreateAttributes(); @Override Region<K, V> create(String name); @Override @SuppressWarnings("unchecked") Region<K, V> createSubregion(Region<?, ?> parent, String name); InternalRegionArguments getInternalRegionArguments(); InternalRegionFactory<K, V> setIsUsedForPartitionedRegionAdmin(boolean adminFlag); InternalRegionFactory<K, V> setPartitionedRegionBucketRedundancy(int redundancy); InternalRegionFactory<K, V> setPartitionedRegionAdvisor(RegionAdvisor advisor); InternalRegionFactory<K, V> setBucketAdvisor(BucketAdvisor advisor); InternalRegionFactory<K, V> setPersistenceAdvisor(PersistenceAdvisor persistenceAdvisor); InternalRegionFactory<K, V> setDiskRegion(DiskRegion diskRegion); InternalRegionFactory<K, V> setIsUsedForMetaRegion(boolean isMetaRegion); InternalRegionFactory<K, V> setMetaRegionWithTransactions(
      boolean metaRegionWithTransactions); InternalRegionFactory<K, V> setLoaderHelperFactory(
      LoaderHelperFactory loaderHelperFactory); InternalRegionFactory<K, V> setDestroyLockFlag(boolean getDestoryLock); InternalRegionFactory<K, V> setSnapshotInputStream(InputStream snapshotInputStream); InternalRegionFactory<K, V> setImageTarget(InternalDistributedMember imageTarget); InternalRegionFactory<K, V> setRecreateFlag(boolean recreate); InternalRegionFactory<K, V> setInternalMetaRegion(LocalRegion r); InternalRegionFactory<K, V> setCachePerfStatsHolder(
      HasCachePerfStats cachePerfStatsHolder); InternalRegionFactory<K, V> setPartitionedRegion(PartitionedRegion partitionedRegion); InternalRegionFactory<K, V> setTestCallable(LocalRegion.TestCallable c); InternalRegionFactory<K, V> setUserAttribute(Object userAttr); InternalRegionFactory<K, V> setIsUsedForSerialGatewaySenderQueue(boolean queueFlag); InternalRegionFactory<K, V> setIsUsedForParallelGatewaySenderQueue(boolean queueFlag); InternalRegionFactory<K, V> setParallelGatewaySender(AbstractGatewaySender pgSender); InternalRegionFactory<K, V> setSerialGatewaySender(AbstractGatewaySender serialSender); InternalRegionFactory<K, V> setIndexes(List indexes); InternalRegionFactory<K, V> addCacheServiceProfile(CacheServiceProfile profile); InternalRegionFactory<K, V> addInternalAsyncEventQueueId(String aeqId); InternalRegionFactory<K, V> setInternalRegion(final boolean internalRegion);  }
@Test public void createSubregionWithoutInternalRegionArgumentsCallsParentCreateSubregion() throws Exception { InternalRegionFactory<Object, Object> regionFactory = new InternalRegionFactory<>(cache); String regionName = "regionName"; Region<?, ?> parent = mock(InternalRegion.class); regionFactory.createSubregion(parent, regionName); verify(parent).createSubregion(same(regionName), any()); }