// headers
mockRequest.setMethod(WebDAVMethod.PROPFIND.name());
mockRequest.setRequestURI(requestURI);
mockRequest.setContentType(MediaType.APPLICATION_XML);
if (depth >= 0) {
mockRequest.addHeader(WebDAVHeaders.DEPTH, String.valueOf(depth));
}
// body
StringWriter writer = new StringWriter();
Propfind.marshal(propfind, writer);
mockRequest.setContent(writer.toString().getBytes());