use of org.mule.runtime.core.api.policy.OperationPolicyParametersTransformer in project mule by mulesoft.
the class CompositeOperationPolicyTestCase method singlePolicy.
@Test
public void singlePolicy() throws Exception {
compositeOperationPolicy = new CompositeOperationPolicy(asList(firstPolicy), operationPolicyParametersTransformer, operationPolicyProcessorFactory, operationParametersProcessor, operationExecutionFunction, streamingManager);
CoreEvent result = from(compositeOperationPolicy.process(initialEvent)).doOnNext(event1 -> System.out.println("FINAL " + event1.getMessage().getPayload().getValue())).block();
assertThat(result.getMessage(), is(nextProcessResultEvent.getMessage()));
verify(operationExecutionFunction).execute(any(), same(initialEvent));
verify(operationPolicyProcessorFactory).createOperationPolicy(same(firstPolicy), any());
verify(firstPolicyOperationPolicyProcessor).apply(any());
}
Aggregations