Mule Solace PubSub+ connector best way to mimic SOLACE:CONNECTIVITY error in MUnit
Hey all,
I'm wondering if anyone has any knowledge of the best way to throw the specific Solace errors that will set the error context properly as if the application was running. We are using the PubSub+ connector within a MuleSoft application that is running on Mule 4.4.0 and MUnit tools and runner version of 3.0.0.
Currently we have MUnit test cases setup and can throw the specific error type id of SOLACE:CONNECTIVITY, but the error context is not setup properly and the failingComponent field is not set which our error handling module relies on to recall the failing flow for this type of error. So we cannot accurately setup MUnit tests for our retries at this stage (functionality works fine in run and debug mode, just cannot see how to throw the error properly using the mock when component).
Within the error during runtime/debug I can see the below exceptions being thrown but unsure how to mimic them:
exception:
org.mule.runtime.api.connection.ConnectionException
cause:
com.solacesystems.jcsmp.JCSMPTransportException
So if anyone has information of the best way to do this it would be much appreciated.
Cheers,
Shaun