CRResolvableBean bean;
if (path != null && !path.equals("")) {
bean = config.getNewRequestProcessorInstance(1).getFirstMatchingResolvable(
new CRRequest("object.filename == '" + name + "' AND object.pub_dir == '" + path + "'"));
} else {
RequestProcessor rp = config.getNewRequestProcessorInstance(1);
assertNotNull("Cannot get RequestProcessor from config", rp);
bean = rp.getFirstMatchingResolvable(new CRRequest("object.filename == '" + name + "'"));
}
assertEquals("The contents of the file do not match the content of the RequestProcessor. Therefore the file was not updated.",
bean.get("binarycontent"), filecontent);
}