MessageExchange exchange = null;
if (testStep instanceof WsdlTestRequestStep) {
exchange = new WsdlResponseMessageExchange(((WsdlTestRequestStep) testStep).getTestRequest());
} else if (testStep instanceof RestTestRequestStepInterface) {
exchange = new RestResponseMessageExchange(((RestRequestInterface) ((RestTestRequestStepInterface) testStep).getTestRequest()));
} else if (testStep instanceof HttpTestRequestStepInterface) {
exchange = new HttpResponseMessageExchange(((HttpTestRequestStepInterface) testStep).getTestRequest());
} else if (testStep instanceof WsdlMockResponseTestStep) {
exchange = new WsdlMockResponseMessageExchange(((WsdlMockResponseTestStep) testStep).getMockResponse());
}