use of org.apache.geode.internal.cache.wan.AsyncEventQueueTestBase in project geode by apache.
the class AsyncEventListenerDUnitTest method testCreateAsyncEventQueueWithNullListener.
/**
* Test to verify that AsyncEventQueue can not be created when null listener is passed.
*/
@Test
public void testCreateAsyncEventQueueWithNullListener() {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase();
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
AsyncEventQueueFactory asyncQueueFactory = cache.createAsyncEventQueueFactory();
try {
asyncQueueFactory.create("testId", null);
fail("AsyncQueueFactory should not allow to create AsyncEventQueue with null listener");
} catch (IllegalArgumentException e) {
// expected
}
}
Aggregations