Register the ClientMembershipListener in a void, @PostConstruct, SubscriptionEnabledClientServerIntegrationTestsConfiguration class method.
Re-implement isProxyClientRegion(..) to short circuit if the ClientRegionFactoryBean.poolName is set.
Remove the unneeded isProxyClientRegion(:ClientRegionShortcut) method.
Rename isProxyClientRegion(..) to isClientProxyRegion(..).
Add methods to override the default Socket connect timeout and general timeout via extension.
Add ClientCacheConfigurer to configure the ClientCache, DEFAULT Pool Socket.connect(..) timeout.
Add BeanPostProcessor to configure any PoolFactoryBean.socketConnectTimeout.
The bug was caused by the mocking logic in Region.getAttributes(), which lazily initializes the RegionAttributes upon first access, and by extension, the Region AttributesMutator only gets intialized after the Region.getAttributes() method is invoked. Therefore, if Region.getAttributesMutator() is called before Region.getAttributes() and any AttributesMutator method is invoked then a NullPointerException is thrown.