public static List<Object[]> data() {
List<Object[]> data = new ArrayList<Object[]>();
List<TestElement> testData = new ArrayList<TestElement>();
// functions:
RuleBaseElementId funcId1 = new RuleBaseElementId(RuleBaseElementType.Function, "org.openengsb", "test42");
RuleBaseElementId funcId2 = new RuleBaseElementId(RuleBaseElementType.Function, "at.ac.tuwien", "test");
String func1 = "function void test42(){ System.out.println(\"sample-code\");}";
String func2 = "function void test(){ System.out.println(\"bla42\");}";
testData.add(new TestElement(funcId1, func1));
testData.add(new TestElement(funcId1, func1));
testData.add(new TestElement(funcId2, func2));
testData.add(new TestElement(funcId2, func2));
data.add(new Object[]{ testData });
testData = new ArrayList<TestElement>();
RuleBaseElementId ruleId1 = new RuleBaseElementId(RuleBaseElementType.Rule, "org.openengsb", "test42");
RuleBaseElementId ruleId2 = new RuleBaseElementId(RuleBaseElementType.Rule, "at.ac.tuwien", "test");
String rule1 = "when\nthen\nSystem.out.println(\"sample-code\");";
String rule2 = "when\nthen\nSystem.out.println(\"\");";
testData.add(new TestElement(ruleId1, rule1));
testData.add(new TestElement(ruleId1, rule2));
testData.add(new TestElement(ruleId2, rule1));
testData.add(new TestElement(ruleId2, rule2));
data.add(new Object[]{ testData });
testData = new ArrayList<TestElement>();
String sampleFlow = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<process xmlns=\"http://drools.org/drools-5.0/process\""
+ " xmlns:xs=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " xs:schemaLocation=\"http://drools.org/drools-5.0/process drools-processes-5.0.xsd\""
+ " type=\"RuleFlow\" name=\"flowname\" id=\"flowId\" "
+ "package-name=\"org.openengsb\" >" + "" + " <header>" + " </header>" + " <nodes>"
+ " <start id=\"1\" name=\"Start\" x=\"100\" y=\"100\" width=\"48\" height=\"48\" />"
+ " <end id=\"2\" name=\"End\" x=\"245\" y=\"105\" width=\"48\" height=\"48\" />" + " </nodes>"
+ " <connections>" + " <connection from=\"1\" to=\"2\" />" + " </connections>" + "</process>";
RuleBaseElementId flowId1 = new RuleBaseElementId(RuleBaseElementType.Process, "org.openengsb", "flowId");
RuleBaseElementId flowId2 = new RuleBaseElementId(RuleBaseElementType.Process, "at.ac.tuwien", "flowId2");
testData.add(new TestElement(flowId1, sampleFlow));
testData.add(new TestElement(flowId1, sampleFlow));
sampleFlow = sampleFlow.replace("org.openengsb", "at.ac.tuwien").replace("flowId", "flowId2");
testData.add(new TestElement(flowId2, sampleFlow));