// transform it into a GetRecordsResponse (this time with the canonical location)
CSWRecordTransformer tx = new CSWRecordTransformer(request, true);
tx.setIndentation(2);
StringWriter sw = new StringWriter();
tx.transform(response, sw);
// System.out.println(sw);
Document dom = XMLUnit.buildControlDocument(sw.toString());
// checking root elements