Reputation: 1
I have a flow like this in mule 3.3.1
http--->JavaComponent (call WebService through SoapWS.java)---->setPayLoad----> Http Endpoint
the problem: I need to write test for this flow but I don't know how mock SoapWS.java.
I'm writting automated tests so i can't change the class manually It has to be automatic.
Upvotes: 0
Views: 256
Reputation: 33413
Use Spring to inject the "caller" to the web service in your Java component. At test time, inject a stub.
Extract the configuration of this "caller" in another Mule XML configuration. At test time, load the main configuration and a test one that contains the stubs.
Upvotes: 1