Search in sources :

Example 11 with ErrorTypeRepository

use of org.mule.runtime.api.exception.ErrorTypeRepository in project mule by mulesoft.

the class AbstractExtensionMessageSourceTestCase method getStartUpRegistryObjects.

@Override
protected Map<String, Object> getStartUpRegistryObjects() {
    ErrorTypeRepository errorTypeRepository = Mockito.mock(ErrorTypeRepository.class);
    when(errorTypeRepository.getErrorType(FLOW_BACK_PRESSURE)).thenReturn(of(mock(ErrorType.class)));
    Map<String, Object> registryObjects = new HashMap<>();
    registryObjects.put("errorTypeRepository", errorTypeRepository);
    return registryObjects;
}
Also used : ErrorTypeRepository(org.mule.runtime.api.exception.ErrorTypeRepository) HashMap(java.util.HashMap)

Aggregations

ErrorTypeRepository (org.mule.runtime.api.exception.ErrorTypeRepository)11 ErrorType (org.mule.runtime.api.message.ErrorType)4 ComponentIdentifier (org.mule.runtime.api.component.ComponentIdentifier)3 InitialisationException (org.mule.runtime.api.lifecycle.InitialisationException)3 SingleErrorTypeMatcher (org.mule.runtime.core.api.exception.SingleErrorTypeMatcher)3 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 ConfigurationComponentLocator (org.mule.runtime.api.component.location.ConfigurationComponentLocator)2 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)2 ErrorTypeMatcher (org.mule.runtime.core.api.exception.ErrorTypeMatcher)2 TRUE (java.lang.Boolean.TRUE)1 ArrayList (java.util.ArrayList)1 Arrays.stream (java.util.Arrays.stream)1 Collections.singletonList (java.util.Collections.singletonList)1 List (java.util.List)1 Optional (java.util.Optional)1 Optional.empty (java.util.Optional.empty)1 Optional.ofNullable (java.util.Optional.ofNullable)1 Consumer (java.util.function.Consumer)1 Function (java.util.function.Function)1