Search in sources :

Example 6 with AnnotatedProcessor

use of org.mule.runtime.core.privileged.processor.AnnotatedProcessor in project mule by mulesoft.

the class MessagingExceptionTestCase method withFailingProcessorNoPathResolver.

@Test
public void withFailingProcessorNoPathResolver() {
    AnnotatedProcessor mockProcessor = mock(AnnotatedProcessor.class);
    when(mockProcessor.getLocation()).thenReturn(fromSingleComponent("Mock@1"));
    when(mockProcessor.toString()).thenReturn("Mock@1");
    MessagingException exception = new MessagingException(createStaticMessage(""), testEvent, mockProcessor);
    exception.getInfo().putAll(locationProvider.getContextInfo(createInfo(testEvent, exception, mockProcessor), mockProcessor));
    assertThat(exception.getInfo().get(INFO_LOCATION_KEY).toString(), is("Mock@1 @ MessagingExceptionTestCase:unknown:-1"));
}
Also used : AnnotatedProcessor(org.mule.runtime.core.privileged.processor.AnnotatedProcessor) MessagingException(org.mule.runtime.core.internal.exception.MessagingException) SmallTest(org.mule.tck.size.SmallTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 MessagingException (org.mule.runtime.core.internal.exception.MessagingException)6 AnnotatedProcessor (org.mule.runtime.core.privileged.processor.AnnotatedProcessor)6 SmallTest (org.mule.tck.size.SmallTest)6