@Test public void testHandleErrorMessage_CurrentMicroserviceIsTheLastOneInRoute() { Message message = mock(Message.class); when(message.getContextValue(ContextImpl.MS_API_ROUTING_PLAN_HEADER)).thenReturn( "microservice1,microservice2,microservice3"); when(context.getMicroServiceBaseURI()).thenReturn("microservice3"); managedMessageListener.onErrorMessage(message, context); verify(messageListener).onErrorMessage(eq(message), eq(context)); }
@Override public void onErrorMessage(Message message, Context context) { logger.error("Error message received {}", message.getMessageHeader(ERROR_HEADER)); handleMessage(message, context, true); }
ManagedMessageListenerImpl implements ManagedMessageListener { @Override public void onErrorMessage(Message message, Context context) { logger.error("Error message received {}", message.getMessageHeader(ERROR_HEADER)); handleMessage(message, context, true); } }
ManagedMessageListenerImpl implements ManagedMessageListener { @Override public void onErrorMessage(Message message, Context context) { logger.error("Error message received {}", message.getMessageHeader(ERROR_HEADER)); handleMessage(message, context, true); } ManagedMessageListenerImpl(
            Context context,
            MessageListener messageListener,
            ManagedInputQueue managedQueue,
            int threadOrdinal); }
ManagedMessageListenerImpl implements ManagedMessageListener { @Override public void onErrorMessage(Message message, Context context) { logger.error("Error message received {}", message.getMessageHeader(ERROR_HEADER)); handleMessage(message, context, true); } ManagedMessageListenerImpl(
            Context context,
            MessageListener messageListener,
            ManagedInputQueue managedQueue,
            int threadOrdinal); @Override void onMessage(Message message, Context context); @Override void onErrorMessage(Message message, Context context); QueueExecutionState getQueueExecutionState(); }
ManagedMessageListenerImpl implements ManagedMessageListener { @Override public void onErrorMessage(Message message, Context context) { logger.error("Error message received {}", message.getMessageHeader(ERROR_HEADER)); handleMessage(message, context, true); } ManagedMessageListenerImpl(
            Context context,
            MessageListener messageListener,
            ManagedInputQueue managedQueue,
            int threadOrdinal); @Override void onMessage(Message message, Context context); @Override void onErrorMessage(Message message, Context context); QueueExecutionState getQueueExecutionState();  }