@Test public void testConfigListeners() { assertNotNull(membershipListener); List<ListenerConfig> list = config.getListenerConfigs(); assertEquals(2, list.size()); for (ListenerConfig lc : list) { if (lc.getClassName() != null) { assertNull(lc.getImplementation()); assertEquals(DummyMembershipListener.class.getName(), lc.getClassName()); } else { assertNotNull(lc.getImplementation()); assertEquals(membershipListener, lc.getImplementation()); } } }
@Test public void testTopicConfig() { TopicConfig testTopicConfig = config.getTopicConfig("testTopic"); assertNotNull(testTopicConfig); assertEquals("testTopic", testTopicConfig.getName()); assertEquals(1, testTopicConfig.getMessageListenerConfigs().size()); ListenerConfig listenerConfig = testTopicConfig.getMessageListenerConfigs().get(0); assertEquals("com.hazelcast.spring.DummyMessageListener", listenerConfig.getClassName()); }