private Message receive ( TestContext context ) { Endpoint messageEndpoint = getOrCreateEndpoint ( context ) ; return receiveTimeout > 0 ? messageEndpoint . createConsumer ( ) . receive ( context , receiveTimeout ) : messageEndpoint . createConsumer ( ) . receive ( context , messageEndpoint . getEndpointConfiguration ( ) . getTimeout ( ) ) ; }
Receives the message with respective message receiver implementation .