Search in sources :

Example 1 with SetPayloadMessageProcessor

use of org.mule.runtime.core.internal.processor.simple.SetPayloadMessageProcessor in project mule by mulesoft.

the class SetPayloadMessageProcessorTestCase method setUp.

@Before
public void setUp() throws Exception {
    setPayloadMessageProcessor = new SetPayloadMessageProcessor();
    muleContext = mock(MuleContext.class);
    setPayloadMessageProcessor.setMuleContext(muleContext);
    expressionManager = mock(ExtendedExpressionManager.class);
    when(muleContext.getExpressionManager()).thenReturn(expressionManager);
    when(muleContext.getConfiguration()).thenReturn(mock(MuleConfiguration.class));
    when(expressionManager.parse(anyString(), any(CoreEvent.class), any(ComponentLocation.class))).thenAnswer(invocation -> (String) invocation.getArguments()[0]);
}
Also used : MuleContext(org.mule.runtime.core.api.MuleContext) ComponentLocation(org.mule.runtime.api.component.location.ComponentLocation) SetPayloadMessageProcessor(org.mule.runtime.core.internal.processor.simple.SetPayloadMessageProcessor) MuleConfiguration(org.mule.runtime.core.api.config.MuleConfiguration) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) ExtendedExpressionManager(org.mule.runtime.core.api.el.ExtendedExpressionManager) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ComponentLocation (org.mule.runtime.api.component.location.ComponentLocation)1 MuleContext (org.mule.runtime.core.api.MuleContext)1 MuleConfiguration (org.mule.runtime.core.api.config.MuleConfiguration)1 ExtendedExpressionManager (org.mule.runtime.core.api.el.ExtendedExpressionManager)1 CoreEvent (org.mule.runtime.core.api.event.CoreEvent)1 SetPayloadMessageProcessor (org.mule.runtime.core.internal.processor.simple.SetPayloadMessageProcessor)1