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"));
}
Aggregations