Search in sources :

Example 6 with ExpressionRuntimeException

use of org.mule.runtime.core.api.expression.ExpressionRuntimeException in project mule by mulesoft.

the class SplitAggregateScopeTestCase method failingExpression.

@Test
@DescriptorKey("An invalid collection expression result in a ExpressionRuntimeException")
public void failingExpression() throws Exception {
    SensingNullMessageProcessor nullMessageProcessor = new SensingNullMessageProcessor();
    router.setMessageProcessors(singletonList(nullMessageProcessor));
    router.setCollectionExpression("!@INVALID");
    muleContext.getInjector().inject(router);
    router.setAnnotations(getAppleFlowComponentLocationAnnotations());
    router.initialise();
    expectedException.expect(MessagingException.class);
    expectedException.expectCause(instanceOf(ExpressionRuntimeException.class));
    router.process(testEvent());
}
Also used : ExpressionRuntimeException(org.mule.runtime.core.api.expression.ExpressionRuntimeException) SensingNullMessageProcessor(org.mule.tck.SensingNullMessageProcessor) Test(org.junit.Test) DescriptorKey(javax.management.DescriptorKey)

Aggregations

ExpressionRuntimeException (org.mule.runtime.core.api.expression.ExpressionRuntimeException)6 InitialisationException (org.mule.runtime.api.lifecycle.InitialisationException)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 Iterator (java.util.Iterator)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 Lock (java.util.concurrent.locks.Lock)1 DescriptorKey (javax.management.DescriptorKey)1 Test (org.junit.Test)1 CompileException (org.mule.mvel2.CompileException)1 MuleException (org.mule.runtime.api.exception.MuleException)1 Message (org.mule.runtime.api.message.Message)1 OBJECT (org.mule.runtime.api.metadata.DataType.OBJECT)1 TypedValue (org.mule.runtime.api.metadata.TypedValue)1 ObjectStoreException (org.mule.runtime.api.store.ObjectStoreException)1 CursorIteratorProvider (org.mule.runtime.api.streaming.object.CursorIteratorProvider)1