I'm trying to run a simple Functional test
in Mule 3.3. Below is my sample code:
import java.util.Map;
import org.junit.Test;
import org.mule.api.MuleMessage;
import org.mule.api.client.MuleClient;
import org.mule.tck.junit4.FunctionalTestCase;
import static org.junit.Assert.*;
public class SoapServiceTest extends FunctionalTestCase {
@Override
protected String getConfigResources() {
return "mule-config.xml,core-config.xml";
}
@Test
public void testSend() throws Exception
{
MuleClient client = muleContext.getClient();
String payload = "foo";
Map<String, Object> properties = null;
MuleMessage result = client.send("http://localhost:61005/service", payload, properties);
assertNotNull(result.getPayloadAsString());
}
}
But it complains java.lang.NoClassDefFoundError: org/junit/rules/TestRule
. I've junit4.8.1.jar
in my classpath but that doesn't have TestRule
class which guess is junit4.9
onwards.
Does Mule needs this class? I'm not using any of the annotations of TestRule