originalTransport = TestingUtil.extractGlobalComponent(cache1.getCacheManager(), Transport.class);
rpcManager = (RpcManagerImpl) TestingUtil.extractComponent(cache1, RpcManager.class);
rpcManager.setTransport(mockTransport);
when(
mockTransport.invokeRemotely((List<Address>) anyObject(),
(CacheRpcCommand) anyObject(), eq(ResponseMode.SYNCHRONOUS), anyLong(),
anyBoolean(), (ResponseFilter) anyObject(), anyBoolean(), anyBoolean())).thenReturn(emptyResponses);
// check that the replication call was sync
cache1.put("k", "v");