TestingUtil.replaceField(remoteExecutorService, "remoteCommandsExecutor",
extractGlobalComponent(cacheManager, InboundInvocationHandler.class),
InboundInvocationHandlerImpl.class);
GetKeyValueCommand getKeyValueCommand =
new GetKeyValueCommand("key", InfinispanCollections.<Flag>emptySet(), false, new InternalEntryFactoryImpl());
PutKeyValueCommand putKeyValueCommand =
new PutKeyValueCommand("key", "value", false, null,
new EmbeddedMetadata.Builder().build(), InfinispanCollections.<Flag>emptySet(), AnyEquivalence.getInstance());
//populate commands
blockingCacheRpcCommand = new ReduceCommand<Object, Object>(cacheName);
nonBlockingCacheRpcCommand = new ClusteredGetCommand(cacheName);
blockingNonCacheRpcCommand = new CacheTopologyControlCommand();
//the GetKeyValueCommand is not replicated, but I only need a command that returns false in canBlock()
nonBlockingNonCacheRpcCommand = new GetKeyValueCommand("key", InfinispanCollections.<Flag>emptySet(), false, new InternalEntryFactoryImpl());
blockingSingleRpcCommand = new SingleRpcCommand(cacheName, putKeyValueCommand);
nonBlockingSingleRpcCommand = new SingleRpcCommand(cacheName, getKeyValueCommand);
blockingMultipleRpcCommand = new MultipleRpcCommand(Arrays.<ReplicableCommand>asList(putKeyValueCommand, putKeyValueCommand), cacheName);
blockingMultipleRpcCommand2 = new MultipleRpcCommand(Arrays.<ReplicableCommand>asList(putKeyValueCommand, getKeyValueCommand), cacheName);
nonBlockingMultipleRpcCommand = new MultipleRpcCommand(Arrays.<ReplicableCommand>asList(getKeyValueCommand, getKeyValueCommand), cacheName);