throwable = filterData.getSessionException( i );
results.addDiffResult( "encountered test recorder session exception(" + i + ")( " +
Logger.format( throwable, throwable ) + " )" );
}
try {
DiffEngine engine = DiffEngineFactory.getInstance( filterData );
String resp = filterData.getRespData().getBody();
String body = null;
// replace the CDATA in the body. We escape the CDATA so we can nest this.
int pos = resp.indexOf("<![CDATA[");
if (pos != -1) {
body = resp;
resp = resp.replaceAll("\\Q<![CDATA[\\E","<![CDATA[");
resp = resp.replaceAll("\\Q]]>","]]>");
filterData.getRespData().setBody(resp);
}
results = engine.diff( recordSessionBean.getRequestData( testCount() ),
recordSessionBean.getResponseData( testCount() ),
filterData.getReqData(), filterData.getRespData(), results );
if (body != null) {
filterData.getRespData().setBody(body);
}