IdempotentSecureHashMessageFilter ir = new IdempotentSecureHashMessageFilter();
ir.setFlowConstruct(service);
ir.setThrowOnUnaccepted(false);
MuleMessage okMessage = new DefaultMuleMessage("OK", muleContext);
MuleEvent event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
// This one will process the event on the target endpoint
event = ir.process(event);
assertNotNull(event);
// This will not process, because the message is a duplicate
okMessage = new DefaultMuleMessage("OK", muleContext);
event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
event = ir.process(event);
assertNull(event);
// This will process, because the message is not a duplicate
okMessage = new DefaultMuleMessage("Not OK", muleContext);
event = new DefaultMuleEvent(okMessage, endpoint1, (MuleSession) session.proxy());
event = ir.process(event);
assertNotNull(event);
}