public Endpoint getOrCreateEndpoint ( TestContext context ) { if ( endpoint != null ) { return endpoint ; } else if ( StringUtils . hasText ( endpointUri ) ) { endpoint = context . getEndpointFactory ( ) . create ( endpointUri , context ) ; return endpoint ; } else { throw new CitrusRuntimeException ( "Neither endpoint nor endpoint uri is set properly!" ) ; } }
Creates or gets the endpoint instance .