GatewaySenderQueueEntrySynchronizationOperation { protected GemFireCacheImpl getCache() { return (GemFireCacheImpl) region.getDistributionManager().getCache(); } protected  GatewaySenderQueueEntrySynchronizationOperation(InternalDistributedMember recipient,
      InternalRegion internalRegion, List<InitialImageOperation.Entry> giiEntriesToSynchronize);   }
@Test public void ReplyProcessorGetCacheDelegateToDistributionManager() { operation = mock(GatewaySenderQueueEntrySynchronizationOperation.class); GatewaySenderQueueEntrySynchronizationOperation.GatewaySenderQueueEntrySynchronizationReplyProcessor processor = new GatewaySenderQueueEntrySynchronizationOperation.GatewaySenderQueueEntrySynchronizationReplyProcessor( distributionManager, recipient, operation); when(distributionManager.getCache()).thenReturn(cache); assertThat(processor.getCache()).isEqualTo(cache); }
@Test public void GatewaySenderQueueEntrySynchronizationOperationGetCacheDelegateToDistributionManager() { InitialImageOperation.Entry entry = mock(InitialImageOperation.Entry.class); List<InitialImageOperation.Entry> list = new ArrayList<>(); list.add(entry); operation = new GatewaySenderQueueEntrySynchronizationOperation(recipient, region, list); when(region.getDistributionManager()).thenReturn(distributionManager); when(distributionManager.getCache()).thenReturn(cache); assertThat(operation.getCache()).isEqualTo(cache); }