@Test public void testDefaultFlowOneWay() throws Exception { OutboundEndpoint endpoint = createOutboundEndpoint(null, null, null, null, MessageExchangePattern.ONE_WAY, null); assertTrue(endpoint instanceof DynamicOutboundEndpoint); testOutboundEvent = createTestOutboundEvent(); MuleEvent result = endpoint.process(testOutboundEvent); assertEventDispatched(); assertSame(VoidMuleEvent.getInstance(), result); assertMessageSentEqual(MyMessageDispatcherFactory.dispatcher.sensedDispatchEvent); }
@Test public void successfulWithNullEventResponseFromRoute() throws Exception { when(mockRoute.process(event)).thenReturn(VoidMuleEvent.getInstance()); SynchronousUntilSuccessfulProcessingStrategy processingStrategy = createProcessingStrategy(); assertThat((VoidMuleEvent) processingStrategy.route(event), is(VoidMuleEvent.getInstance())); }