}
public void testSetListeners() {
final EventLogListener eventListener1 = new EventLogListener();
final RemoteCache<Integer, String> rcache = remoteCacheManager.getCache();
withClientListener(eventListener1, new RemoteCacheManagerCallable(remoteCacheManager) {
@Override
public void call() {
Set<Object> listeners = rcache.getListeners();
assertEquals(1, listeners.size());
assertEquals(eventListener1, listeners.iterator().next());
final EventLogListener eventListener2 = new EventLogListener();
withClientListener(eventListener2, new RemoteCacheManagerCallable(remoteCacheManager) {
@Override
public void call() {
Set<Object> listeners = rcache.getListeners();
assertEquals(2, listeners.size());
assertTrue(listeners.contains(eventListener1));