use of org.mule.runtime.api.exception.DefaultMuleException in project mule by mulesoft.
the class ExceptionsTestCase method testExceptionChaining.
@Test
public void testExceptionChaining() {
String rootMsg = "Root Test Exception Message";
String msg = "Test Exception Message";
Exception e = new MuleContextException(I18nMessageFactory.createStaticMessage(msg), new DefaultMuleException(I18nMessageFactory.createStaticMessage(rootMsg)));
assertEquals(rootMsg, e.getCause().getMessage());
assertEquals(msg, e.getMessage());
assertEquals(e.getClass().getName() + ": " + msg, e.toString());
}
Aggregations