Assert.assertFalse("Allow string whitelist allowed double event sync.", checkConsumeAllowed(new MySyncSub(), Double.class));
}
@Test
public void testAllowMultiSubs() throws Exception {
ConcurrentCompositeConfiguration config = (ConcurrentCompositeConfiguration)ConfigurationManager.getConfigInstance();
config.setOverrideProperty(SyncSubscribersGatekeeper.ALLOW_SYNC_SUBSCRIBERS, "true");
config.setOverrideProperty(SyncSubscribersGatekeeper.SYNC_SUBSCRIBERS_WHITELIST_JSON, ALLOW_MULTI_SUBS_JSON);
Assert.assertTrue("Allow multi whitelist did not allow string event sync on sub1.", checkConsumeAllowed(new MySyncSub(), String.class));
Assert.assertTrue("Allow multi whitelist did not allow double event sync on sub2.", checkConsumeAllowed(new MySyncSub2(), Double.class));
Assert.assertFalse("Allow multi whitelist allowed double event sync on sub1.", checkConsumeAllowed(new MySyncSub(), Double.class));