Index: src/main/java/org/infinispan/commands/read/GetKeyValueCommand.java =================================================================== --- src/main/java/org/infinispan/commands/read/GetKeyValueCommand.java (revision 2513) +++ src/main/java/org/infinispan/commands/read/GetKeyValueCommand.java (working copy) @@ -75,10 +75,11 @@ if (trace) log.trace("Entry has been deleted and is of type " + entry.getClass().getSimpleName()); return null; } - notifier.notifyCacheEntryVisited(key, true, ctx); - Object result = returnCacheEntry ? entry : entry.getValue(); + Object value = entry.getValue(); + notifier.notifyCacheEntryVisited(key, value, true, ctx); + Object result = returnCacheEntry ? entry : value; if (trace) log.trace("Found value " + result); - notifier.notifyCacheEntryVisited(key, false, ctx); + notifier.notifyCacheEntryVisited(key, value, false, ctx); return result; } Index: src/main/java/org/infinispan/commands/write/EvictCommand.java =================================================================== --- src/main/java/org/infinispan/commands/write/EvictCommand.java (revision 2513) +++ src/main/java/org/infinispan/commands/write/EvictCommand.java (working copy) @@ -59,7 +59,7 @@ @Override public void notify(InvocationContext ctx, Object value, boolean isPre) { - notifier.notifyCacheEntryEvicted(key, isPre, ctx); + notifier.notifyCacheEntryEvicted(key, value, isPre, ctx); } @Override Index: src/main/java/org/infinispan/commands/write/InvalidateCommand.java =================================================================== --- src/main/java/org/infinispan/commands/write/InvalidateCommand.java (revision 2513) +++ src/main/java/org/infinispan/commands/write/InvalidateCommand.java (working copy) @@ -74,7 +74,7 @@ @Override protected void notify(InvocationContext ctx, Object value, boolean isPre) { - notifier.notifyCacheEntryInvalidated(key, isPre, ctx); + notifier.notifyCacheEntryInvalidated(key, value, isPre, ctx); } @Override Index: src/main/java/org/infinispan/container/EntryFactoryImpl.java =================================================================== --- src/main/java/org/infinispan/container/EntryFactoryImpl.java (revision 2513) +++ src/main/java/org/infinispan/container/EntryFactoryImpl.java (working copy) @@ -166,12 +166,12 @@ // this is the *only* point where new entries can be created!! if (trace) log.trace("Creating new entry."); // now to lock and create the entry. Lock first to prevent concurrent creation! - notifier.notifyCacheEntryCreated(key, true, ctx); + notifier.notifyCacheEntryCreated(key, null, true, ctx); mvccEntry = createWrappedEntry(key, null, true, false, -1); mvccEntry.setCreated(true); ctx.putLookedUpEntry(key, mvccEntry); mvccEntry.copyForUpdate(container, writeSkewCheck); - notifier.notifyCacheEntryCreated(key, false, ctx); + notifier.notifyCacheEntryCreated(key, null, false, ctx); } else { releaseLock(key); } Index: src/main/java/org/infinispan/eviction/EvictionManagerImpl.java =================================================================== --- src/main/java/org/infinispan/eviction/EvictionManagerImpl.java (revision 2513) +++ src/main/java/org/infinispan/eviction/EvictionManagerImpl.java (working copy) @@ -145,7 +145,7 @@ } catch (Exception e) { log.warn("Could not acquire lock for eviction of {0}", key, e); } - cacheNotifier.notifyCacheEntryEvicted(key, true, context); + cacheNotifier.notifyCacheEntryEvicted(key, null, true, context); } @Override @@ -155,7 +155,7 @@ } catch (CacheLoaderException e) { log.warn("Unable to passivate entry under {0}", key, e); } - cacheNotifier.notifyCacheEntryEvicted(key, false, getInvocationContext()); + cacheNotifier.notifyCacheEntryEvicted(key, value.getValue(), false, getInvocationContext()); releaseLock(key); } Index: src/main/java/org/infinispan/eviction/PassivationManagerImpl.java =================================================================== --- src/main/java/org/infinispan/eviction/PassivationManagerImpl.java (revision 2513) +++ src/main/java/org/infinispan/eviction/PassivationManagerImpl.java (working copy) @@ -55,11 +55,12 @@ @Override public void passivate(Object key, InternalCacheEntry entry, InvocationContext ctx) throws CacheLoaderException { if (enabled) { + Object value = (entry != null) ? entry.getValue() : null; // notify listeners that this entry is about to be passivated - notifier.notifyCacheEntryPassivated(key, true, ctx); + notifier.notifyCacheEntryPassivated(key, value, true, ctx); log.trace("Passivating entry {0}", key); cacheStore.store(entry); - notifier.notifyCacheEntryPassivated(key, false, ctx); + notifier.notifyCacheEntryPassivated(key, value, false, ctx); if (statsEnabled && entry != null) passivations.getAndIncrement(); } } Index: src/main/java/org/infinispan/interceptors/ActivationInterceptor.java =================================================================== --- src/main/java/org/infinispan/interceptors/ActivationInterceptor.java (revision 2513) +++ src/main/java/org/infinispan/interceptors/ActivationInterceptor.java (working copy) @@ -79,9 +79,9 @@ } @Override - protected void sendNotification(Object key, boolean pre, InvocationContext ctx) { - super.sendNotification(key, pre, ctx); - notifier.notifyCacheEntryActivated(key, pre, ctx); + protected void sendNotification(Object key, Object value, boolean pre, InvocationContext ctx) { + super.sendNotification(key, value, pre, ctx); + notifier.notifyCacheEntryActivated(key, value, pre, ctx); } @ManagedAttribute(description = "Number of activation events") Index: src/main/java/org/infinispan/interceptors/CacheLoaderInterceptor.java =================================================================== --- src/main/java/org/infinispan/interceptors/CacheLoaderInterceptor.java (revision 2513) +++ src/main/java/org/infinispan/interceptors/CacheLoaderInterceptor.java (working copy) @@ -178,22 +178,23 @@ } if (entryExists) { - sendNotification(key, true, ctx); - entry.setValue(loadedEntry.getValue()); + Object value = loadedEntry.getValue(); + sendNotification(key, value, true, ctx); + entry.setValue(value); entry.setLifespan(loadedEntry.getLifespan()); entry.setMaxIdle(loadedEntry.getMaxIdle()); // TODO shouldn't we also be setting last used and created timestamps? entry.setValid(true); - notifier.notifyCacheEntryLoaded(key, false, ctx); - sendNotification(key, false, ctx); + notifier.notifyCacheEntryLoaded(key, value, false, ctx); + sendNotification(key, value, false, ctx); } return entry; } - protected void sendNotification(Object key, boolean pre, InvocationContext ctx) { - notifier.notifyCacheEntryLoaded(key, pre, ctx); + protected void sendNotification(Object key, Object value, boolean pre, InvocationContext ctx) { + notifier.notifyCacheEntryLoaded(key, value, pre, ctx); } private void loadIfNeededAndUpdateStats(InvocationContext ctx, Object key) throws Throwable { Index: src/main/java/org/infinispan/notifications/cachelistener/CacheNotifier.java =================================================================== --- src/main/java/org/infinispan/notifications/cachelistener/CacheNotifier.java (revision 2513) +++ src/main/java/org/infinispan/notifications/cachelistener/CacheNotifier.java (working copy) @@ -38,7 +38,7 @@ /** * Notifies all registered listeners of a CacheEntryCreated event. */ - void notifyCacheEntryCreated(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryCreated(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryModified event. @@ -53,32 +53,32 @@ /** * Notifies all registered listeners of a CacheEntryVisited event. */ - void notifyCacheEntryVisited(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryVisited(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryEvicted event. */ - void notifyCacheEntryEvicted(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryEvicted(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryInvalidated event. */ - void notifyCacheEntryInvalidated(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryInvalidated(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryLoaded event. */ - void notifyCacheEntryLoaded(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryLoaded(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryActivated event. */ - void notifyCacheEntryActivated(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryActivated(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a CacheEntryPassivated event. */ - void notifyCacheEntryPassivated(Object key, boolean pre, InvocationContext ctx); + void notifyCacheEntryPassivated(Object key, Object value, boolean pre, InvocationContext ctx); /** * Notifies all registered listeners of a transaction completion event. Index: src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java =================================================================== --- src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java (revision 2513) +++ src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java (working copy) @@ -111,7 +111,7 @@ return allowedListeners; } - public void notifyCacheEntryCreated(Object key, boolean pre, InvocationContext ctx) { + public void notifyCacheEntryCreated(Object key, Object value, boolean pre, InvocationContext ctx) { if (!cacheEntryCreatedListeners.isEmpty()) { boolean originLocal = ctx.isOriginLocal(); InvocationContext contexts = icc.suspend(); @@ -121,6 +121,7 @@ e.setOriginLocal(originLocal); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_CREATED); for (ListenerInvocation listener : cacheEntryCreatedListeners) listener.invoke(e); @@ -170,7 +171,7 @@ } } - public void notifyCacheEntryVisited(Object key, boolean pre, InvocationContext ctx) { + public void notifyCacheEntryVisited(Object key, Object value, boolean pre, InvocationContext ctx) { if (!cacheEntryVisitedListeners.isEmpty()) { InvocationContext contexts = icc.suspend(); try { @@ -178,6 +179,7 @@ e.setCache(cache); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_VISITED); for (ListenerInvocation listener : cacheEntryVisitedListeners) listener.invoke(e); @@ -187,7 +189,7 @@ } } - public void notifyCacheEntryEvicted(final Object key, final boolean pre, InvocationContext ctx) { + public void notifyCacheEntryEvicted(final Object key, Object value, final boolean pre, InvocationContext ctx) { if (!cacheEntryEvictedListeners.isEmpty()) { final boolean originLocal = ctx.isOriginLocal(); InvocationContext contexts = icc.suspend(); @@ -197,6 +199,7 @@ e.setOriginLocal(originLocal); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_EVICTED); for (ListenerInvocation listener : cacheEntryEvictedListeners) listener.invoke(e); @@ -206,7 +209,7 @@ } } - public void notifyCacheEntryInvalidated(final Object key, final boolean pre, InvocationContext ctx) { + public void notifyCacheEntryInvalidated(final Object key, Object value, final boolean pre, InvocationContext ctx) { if (!cacheEntryInvalidatedListeners.isEmpty()) { final boolean originLocal = ctx.isOriginLocal(); InvocationContext contexts = icc.suspend(); @@ -216,6 +219,7 @@ e.setOriginLocal(originLocal); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_INVALIDATED); for (ListenerInvocation listener : cacheEntryInvalidatedListeners) listener.invoke(e); @@ -225,7 +229,7 @@ } } - public void notifyCacheEntryLoaded(Object key, boolean pre, InvocationContext ctx) { + public void notifyCacheEntryLoaded(Object key, Object value, boolean pre, InvocationContext ctx) { if (!cacheEntryLoadedListeners.isEmpty()) { boolean originLocal = ctx.isOriginLocal(); InvocationContext contexts = icc.suspend(); @@ -235,6 +239,7 @@ e.setOriginLocal(originLocal); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_LOADED); for (ListenerInvocation listener : cacheEntryLoadedListeners) listener.invoke(e); @@ -244,7 +249,7 @@ } } - public void notifyCacheEntryActivated(Object key, boolean pre, InvocationContext ctx) { + public void notifyCacheEntryActivated(Object key, Object value, boolean pre, InvocationContext ctx) { if (!cacheEntryActivatedListeners.isEmpty()) { boolean originLocal = ctx.isOriginLocal(); InvocationContext contexts = icc.suspend(); @@ -254,6 +259,7 @@ e.setOriginLocal(originLocal); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_ACTIVATED); for (ListenerInvocation listener : cacheEntryActivatedListeners) listener.invoke(e); @@ -270,7 +276,7 @@ } } - public void notifyCacheEntryPassivated(Object key, boolean pre, InvocationContext ctx) { + public void notifyCacheEntryPassivated(Object key, Object value, boolean pre, InvocationContext ctx) { if (!cacheEntryPassivatedListeners.isEmpty()) { InvocationContext contexts = icc.suspend(); try { @@ -278,6 +284,7 @@ e.setCache(cache); e.setPre(pre); e.setKey(key); + e.setValue(value); setTx(ctx, e); e.setType(CACHE_ENTRY_PASSIVATED); for (ListenerInvocation listener : cacheEntryPassivatedListeners) listener.invoke(e); Index: src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java =================================================================== --- src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java (revision 2513) +++ src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryEvent.java (working copy) @@ -32,4 +32,5 @@ * @return the key to the affected cache entry. */ Object getKey(); + Object getValue(); } Index: src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java =================================================================== --- src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java (revision 2513) +++ src/main/java/org/infinispan/notifications/cachelistener/event/CacheEntryModifiedEvent.java (working copy) @@ -33,10 +33,4 @@ * @since 4.0 */ public interface CacheEntryModifiedEvent extends CacheEntryEvent { - /** - * Retrieves the value of the entry being modified. - *

- * @return the previous or new value of the entry, depending on whether isPre() is true or false. - */ - Object getValue(); } Index: src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierImplTest.java =================================================================== --- src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierImplTest.java (revision 2513) +++ src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierImplTest.java (working copy) @@ -39,8 +39,8 @@ } public void testNotifyCacheEntryCreated() { - n.notifyCacheEntryCreated("k", true, ctx); - n.notifyCacheEntryCreated("k", false, ctx); + n.notifyCacheEntryCreated("k", "v", true, ctx); + n.notifyCacheEntryCreated("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -48,9 +48,11 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_CREATED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_CREATED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryModified() { @@ -88,8 +90,8 @@ } public void testNotifyCacheEntryVisited() { - n.notifyCacheEntryVisited("k", true, ctx); - n.notifyCacheEntryVisited("k", false, ctx); + n.notifyCacheEntryVisited("k", "v", true, ctx); + n.notifyCacheEntryVisited("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -97,15 +99,16 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_VISITED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_VISITED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); - + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryEvicted() { - n.notifyCacheEntryEvicted("k", true, ctx); - n.notifyCacheEntryEvicted("k", false, ctx); + n.notifyCacheEntryEvicted("k", "v", true, ctx); + n.notifyCacheEntryEvicted("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -113,14 +116,16 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_EVICTED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_EVICTED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryInvalidated() { - n.notifyCacheEntryInvalidated("k", true, ctx); - n.notifyCacheEntryInvalidated("k", false, ctx); + n.notifyCacheEntryInvalidated("k", "v", true, ctx); + n.notifyCacheEntryInvalidated("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -128,14 +133,16 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_INVALIDATED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_INVALIDATED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryLoaded() { - n.notifyCacheEntryLoaded("k", true, ctx); - n.notifyCacheEntryLoaded("k", false, ctx); + n.notifyCacheEntryLoaded("k", "v", true, ctx); + n.notifyCacheEntryLoaded("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -143,14 +150,16 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_LOADED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_LOADED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryActivated() { - n.notifyCacheEntryActivated("k", true, ctx); - n.notifyCacheEntryActivated("k", false, ctx); + n.notifyCacheEntryActivated("k", "v", true, ctx); + n.notifyCacheEntryActivated("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -158,14 +167,16 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_ACTIVATED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_ACTIVATED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyCacheEntryPassivated() { - n.notifyCacheEntryPassivated("k", true, ctx); - n.notifyCacheEntryPassivated("k", false, ctx); + n.notifyCacheEntryPassivated("k", "v", true, ctx); + n.notifyCacheEntryPassivated("k", "v", false, ctx); assert cl.isReceivedPost(); assert cl.isReceivedPre(); @@ -173,9 +184,11 @@ assert cl.getEvents().get(0).getCache() == mockCache; assert cl.getEvents().get(0).getType() == Event.Type.CACHE_ENTRY_PASSIVATED; assert ((CacheEntryEvent) cl.getEvents().get(0)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(0)).getValue().equals("v"); assert cl.getEvents().get(1).getCache() == mockCache; assert cl.getEvents().get(1).getType() == Event.Type.CACHE_ENTRY_PASSIVATED; assert ((CacheEntryEvent) cl.getEvents().get(1)).getKey().equals("k"); + assert ((CacheEntryEvent) cl.getEvents().get(1)).getValue().equals("v"); } public void testNotifyTransactionCompleted() { Index: src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java =================================================================== --- src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java (revision 2513) +++ src/test/java/org/infinispan/notifications/cachelistener/CacheNotifierTest.java (working copy) @@ -58,7 +58,7 @@ } private void initCacheData(Map data) { - mockNotifier.notifyCacheEntryCreated(anyObject(), anyBoolean(), isA(InvocationContext.class)); + mockNotifier.notifyCacheEntryCreated(anyObject(), anyObject(), anyBoolean(), isA(InvocationContext.class)); expectLastCall().anyTimes(); mockNotifier.notifyCacheEntryModified(anyObject(), anyObject(), anyBoolean(), isA(InvocationContext.class)); expectLastCall().anyTimes(); @@ -71,9 +71,9 @@ } private void expectSingleEntryCreated(Object key, Object value) { - mockNotifier.notifyCacheEntryCreated(eq(key), eq(true), isA(InvocationContext.class)); + mockNotifier.notifyCacheEntryCreated(eq(key), eq(value), eq(true), isA(InvocationContext.class)); expectLastCall().once(); - mockNotifier.notifyCacheEntryCreated(eq(key), eq(false), isA(InvocationContext.class)); + mockNotifier.notifyCacheEntryCreated(eq(key), eq(value), eq(false), isA(InvocationContext.class)); expectLastCall().once(); mockNotifier.notifyCacheEntryModified(eq(key), isNull(), eq(true), isA(InvocationContext.class)); expectLastCall().once(); @@ -120,9 +120,9 @@ public void testVisit() throws Exception { initCacheData("key", "value"); - mockNotifier.notifyCacheEntryVisited(eq("key"), eq(true), isA(InvocationContext.class)); + mockNotifier.notifyCacheEntryVisited(eq("key"), eq("value"), eq(true), isA(InvocationContext.class)); expectLastCall().once(); - mockNotifier.notifyCacheEntryVisited(eq("key"), eq(false), isA(InvocationContext.class)); + mockNotifier.notifyCacheEntryVisited(eq("key"), eq("value"), eq(false), isA(InvocationContext.class)); expectLastCall().once(); replay(mockNotifier); cache.get("key");