workflowDeployer.install(ruleFile);
workflowDeployer.install(processFile);
String modifiedRule = "it doesnt matter";
FileUtils.writeStringToFile(ruleFile, modifiedRule);
RuleBaseElementId idRule = new RuleBaseElementId(RuleBaseElementType.Rule, "org.openengsb", "rule");
workflowDeployer.update(ruleFile);
verify(ruleManager, times(1)).addOrUpdate(idRule, modifiedRule);
String process = FileUtils.readFileToString(processFile);
String modifiedProcess = process.replace("org.openengsb", "new.package");
FileUtils.writeStringToFile(processFile, modifiedProcess);
workflowDeployer.update(processFile);
RuleBaseElementId idProcess = new RuleBaseElementId(RuleBaseElementType.Process, "org.openengsb", "process");
verify(ruleManager, times(1)).delete(idProcess);
idProcess.setPackageName("new.package");
verify(ruleManager, times(1)).addOrUpdate(idProcess, modifiedProcess);
}