log.warn("Starting cache");
cache.start();
// now remove the existing RpcDispatcher and replace with one that is a noop.
ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
RPCManager rpcManager = cr.getComponent(RPCManager.class);
RpcDispatcher d = (RpcDispatcher) TestingUtil.extractField(rpcManager, "rpcDispatcher");
d.stop();
RpcDispatcher replacement = new NoopDispatcher();
replacement.setRequestMarshaller(d.getRequestMarshaller());
replacement.setResponseMarshaller(d.getResponseMarshaller());
ReflectionUtil.setValue(rpcManager, "rpcDispatcher", replacement);
long duration = System.currentTimeMillis() - startTime;
log.warn("Started cache. " + printDuration(duration));
}