cfg.setUseLockStriping(false); // to minimise chances of deadlock in the unit test
cfg.setUseLazyDeserialization(true);
EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(cfg);
cache = cm.getCache();
StreamingMarshaller marshaller = TestingUtil.extractComponent(cache, StreamingMarshaller.class);
MockMarshalledValueInterceptor interceptor = new MockMarshalledValueInterceptor(marshaller);
assert TestingUtil.replaceInterceptor(cache, interceptor, MarshalledValueInterceptor.class);
return cm;
}