use of org.apache.geode.internal.cache.extension.ExtensionPoint in project geode by apache.
the class LuceneIndexForPartitionedRegionTest method initializeScenario.
private Region initializeScenario(final boolean withPersistence, final String regionPath, final Cache cache, int localMaxMemory) {
PartitionedRegion region = mock(PartitionedRegion.class);
PartitionAttributes partitionAttributes = new PartitionAttributesFactory().setLocalMaxMemory(localMaxMemory).setTotalNumBuckets(103).create();
RegionAttributes regionAttributes = spy(createRegionAttributes(withPersistence, partitionAttributes));
ExtensionPoint extensionPoint = mock(ExtensionPoint.class);
when(cache.getRegion(regionPath)).thenReturn(region);
when(cache.getRegionAttributes(any())).thenReturn(regionAttributes);
when(region.getAttributes()).thenReturn(regionAttributes);
when(regionAttributes.getPartitionAttributes()).thenReturn(partitionAttributes);
when(region.getPartitionAttributes()).thenReturn(partitionAttributes);
when(region.getExtensionPoint()).thenReturn(extensionPoint);
return region;
}
Aggregations