controllerState);
SourceElement rootElement = fileSource.getRootElement();
rootElement.getChildren().get(2).getChildren().add(
rootElement.getChildren().get(0).getChildren().get(0));
String result = new SourceToXml().toXml(rootElement, true);
String expected = FileUtils.readFileToString(new File(
"src/test/resources/org/apache/torque/generator/source/xml/sourceToXmlWithReferenceResult.xml"));
// remove license from expected file
expected = StringUtils.substringAfterLast(expected, "-->\n\n");
assertEquals(expected, result);