@Override
    public void doExecute(TestContext context) {
        try {
            Message receivedMessage;
            String selector = MessageSelectorBuilder.build(messageSelector, messageSelectorMap, context);

            //receive message either selected or plain with message receiver
            if (StringUtils.hasText(selector)) {
                receivedMessage = receiveSelected(context, selector);
            } else {
                receivedMessage = receive(context);
            }

            if (receivedMessage == null) {
                throw new CitrusRuntimeException("Failed to receive message - message is not available");
            }

            //validate the message
            validateMessage(receivedMessage, context);
        } catch (IOException e) {
            throw new CitrusRuntimeException(e);
        }
    }
@ Override public void doExecute ( TestContext context ) { try { Message receivedMessage ; String selector = MessageSelectorBuilder . build ( messageSelector , messageSelectorMap , context ) ; if ( StringUtils . hasText ( selector ) ) { receivedMessage = receiveSelected ( context , selector ) ; } else { receivedMessage = receive ( context ) ; } if ( receivedMessage == null ) { throw new CitrusRuntimeException ( "Failed to receive message - message is not available" ) ; } validateMessage ( receivedMessage , context ) ; } catch ( IOException e ) { throw new CitrusRuntimeException ( e ) ; } }
Method receives a message via {@link com.consol.citrus.endpoint.Endpoint} instance
constructs a validation context and starts the message validation
via {@link MessageValidator}.

@throws CitrusRuntimeException