### Question:
RegisteredEventListeners { public final boolean registerListener(CacheEventListener cacheEventListener) { return registerListener(cacheEventListener, NotificationScope.ALL); } RegisteredEventListeners(Cache cache);  RegisteredEventListeners(Ehcache cache, CacheStoreHelper helper); final void notifyElementUpdatedOrdered(Element oldElement, Element newElement); final void notifyElementRemovedOrdered(Element element); final void notifyElementPutOrdered(Element element); final void notifyElementRemoved(Element element, boolean remoteEvent); final void notifyElementRemoved(ElementCreationCallback callback, boolean remoteEvent); final void notifyElementPut(Element element, boolean remoteEvent); final void notifyElementPut(ElementCreationCallback callback, boolean remoteEvent); final void notifyElementUpdated(Element element, boolean remoteEvent); final void notifyElementUpdated(ElementCreationCallback callback, boolean remoteEvent); final void notifyElementExpiry(Element element, boolean remoteEvent); final void notifyElementExpiry(ElementCreationCallback callback, boolean remoteEvent); final boolean hasCacheEventListeners(); final void notifyElementEvicted(Element element, boolean remoteEvent); final void notifyElementEvicted(ElementCreationCallback callback, boolean remoteEvent); final void notifyRemoveAll(boolean remoteEvent); final boolean registerListener(CacheEventListener cacheEventListener); final boolean registerListener(CacheEventListener cacheEventListener, NotificationScope scope); final boolean unregisterListener(CacheEventListener cacheEventListener); final boolean hasCacheReplicators(); final Set<CacheEventListener> getCacheEventListeners(); final void dispose(); @Override final String toString();  }### Answer:
@Test public void testNotifyTerracottaStoreOfListenerChangeOnRegister() throws Exception { TerracottaStore store = mock(TerracottaStore.class); RegisteredEventListeners registeredEventListeners = createRegisteredEventListeners(store); CacheEventListener listener = mock(CacheEventListener.class); registeredEventListeners.registerListener(listener); verify(store).notifyCacheEventListenersChanged(); }