public void testIdempotentSecureHashReceiverRouter() throws Exception { Router r = lookupInboundRouterFromService("IdempotentSecureHashReceiverRouter"); assertTrue(r instanceof IdempotentSecureHashReceiver); IdempotentSecureHashReceiver router = (IdempotentSecureHashReceiver) r; assertEquals("SHA-128", router.getMessageDigestAlgorithm()); assertNotNull(router.getStore()); assertTrue(router.getStore() instanceof InMemoryObjectStore); InMemoryObjectStore store = (InMemoryObjectStore) router.getStore(); assertEquals(1001, store.getEntryTTL()); assertEquals(1001, store.getExpirationInterval()); assertEquals(1001, store.getMaxEntries()); assertEquals("xyz", store.getName()); assertNotNull(store.getScheduler()); }
@Test public void testIdempotentSecureHashReceiverRouter() throws Exception { MessageProcessor router = lookupMessageProcessorFromFlow("IdempotentSecureHashReceiverRouter"); assertTrue(router instanceof IdempotentSecureHashMessageFilter); IdempotentSecureHashMessageFilter filter = (IdempotentSecureHashMessageFilter) router; assertEquals("SHA-128", filter.getMessageDigestAlgorithm()); assertNotNull(filter.getStore()); assertTrue(filter.getStore() instanceof InMemoryObjectStore); InMemoryObjectStore<String> store = (InMemoryObjectStore<String>) filter.getStore(); assertEquals(1001, store.getEntryTTL()); assertEquals(1001, store.getExpirationInterval()); assertEquals(1001, store.getMaxEntries()); assertEquals("xyz", store.getName()); assertNotNull(store.getScheduler()); }