use of org.mockito.internal.stubbing.answers.CallsRealMethods in project mockito by mockito.
the class AbstractByteBuddyMockMakerTest method settingsWithSuperCall.
private static <T> MockCreationSettings<T> settingsWithSuperCall(Class<T> type) {
MockSettingsImpl<T> mockSettings = new MockSettingsImpl<T>();
mockSettings.setTypeToMock(type);
mockSettings.defaultAnswer(new CallsRealMethods());
return mockSettings;
}
use of org.mockito.internal.stubbing.answers.CallsRealMethods in project geode by apache.
the class RemoteOperationMessageTest method setUp.
@Before
public void setUp() throws InterruptedException {
cache = Fakes.cache();
dm = mock(DistributionManager.class);
msg = mock(RemoteOperationMessage.class);
r = mock(LocalRegion.class);
txMgr = mock(TXManagerImpl.class);
tx = mock(TXStateProxyImpl.class);
when(msg.checkCacheClosing(dm)).thenReturn(false);
when(msg.checkDSClosing(dm)).thenReturn(false);
when(msg.getCache(dm)).thenReturn(cache);
when(msg.getRegionByPath(cache)).thenReturn(r);
when(msg.getTXManager(cache)).thenReturn(txMgr);
doAnswer(new CallsRealMethods()).when(msg).process(dm);
}
use of org.mockito.internal.stubbing.answers.CallsRealMethods in project geode by apache.
the class PartitionMessageTest method setUp.
@Before
public void setUp() throws PRLocallyDestroyedException, InterruptedException {
cache = Fakes.cache();
dm = mock(DistributionManager.class);
msg = mock(PartitionMessage.class);
pr = mock(PartitionedRegion.class);
txMgr = mock(TXManagerImpl.class);
tx = mock(TXStateProxyImpl.class);
when(msg.checkCacheClosing(dm)).thenReturn(false);
when(msg.checkDSClosing(dm)).thenReturn(false);
when(msg.getPartitionedRegion()).thenReturn(pr);
when(msg.getInternalCache()).thenReturn(cache);
when(msg.getStartPartitionMessageProcessingTime(pr)).thenReturn(startTime);
when(msg.getTXManagerImpl(cache)).thenReturn(txMgr);
doAnswer(new CallsRealMethods()).when(msg).process(dm);
}
Aggregations