1
2
3
4
5
6
7 package org.mule.config.spring;
8
9 import org.mule.tck.junit4.FunctionalTestCase;
10 import org.mule.api.MuleException;
11
12 import static org.junit.Assert.assertEquals;
13 import static org.junit.Assert.assertNotNull;
14
15 public abstract class AbstractInterceptorTestCase extends FunctionalTestCase
16 {
17
18 public static final String MESSAGE = "boo";
19
20 public void assertMessageIntercepted() throws MuleException, InterruptedException
21 {
22 FunctionalTestAdvice advice = (FunctionalTestAdvice) muleContext.getRegistry().lookupObject("advice");
23 assertNotNull("Cannot find advice", advice);
24 String message = advice.getMessage(RECEIVE_TIMEOUT);
25 assertEquals("Bad message", MESSAGE, message);
26 }
27
28 }