public void testRemotePrepareTransaction() throws Exception
{
TreeCache cache = createCacheWithListener();
Interceptor txInterceptor = new TxInterceptor();
txInterceptor.setCache(cache);
Interceptor replicationInterceptor = new OptimisticReplicationInterceptor();
replicationInterceptor.setCache(cache);
Interceptor createInterceptor = new OptimisticCreateIfNotExistsInterceptor();
createInterceptor.setCache(cache);
Interceptor nodeInterceptor = new OptimisticNodeInterceptor();
nodeInterceptor.setCache(cache);
MockInterceptor dummy = new MockInterceptor();
dummy.setCache(cache);
txInterceptor.setNext(replicationInterceptor);
replicationInterceptor.setNext(createInterceptor);
createInterceptor.setNext(nodeInterceptor);
nodeInterceptor.setNext(dummy);
cache.setInterceptorChain(txInterceptor);