use of org.mule.runtime.api.exception.MuleFatalException in project mule by mulesoft.
the class MessagingExceptionResolverTestCase method resolveTopExceptionWithSameError.
@Test
public void resolveTopExceptionWithSameError() {
Optional<Error> surfaceError = mockError(TRANSFORMER, TRANSFORMER_EXCEPTION);
when(event.getError()).thenReturn(surfaceError);
Exception cause = new MuleFatalException(createStaticMessage(EXPECTED_MESSAGE), new LinkageError("!"));
MessagingException me = newMessagingException(cause, event, processor);
MessagingException resolved = resolver.resolve(me, context);
assertExceptionErrorType(resolved, FATAL);
assertExceptionMessage(resolved.getMessage(), EXPECTED_MESSAGE);
}
Aggregations