{
private ControllerState controllerState = new ControllerState();
public XmlParserTest()
{
UnitConfiguration unitConfiguration = new UnitConfiguration();
EntityReferences entityReferences = new EntityReferences();
File schemaFile = new File("src/test/resources/"
+ "org/apache/torque/generator/source/xml/schema.xsd");
byte[] schemaContent;
try
{
schemaContent = FileUtils.readFileToByteArray(schemaFile);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
entityReferences.addEntityReference(
"http://db.apache.org/torque/4.0/generator/test/namespace.xsd",
schemaContent);
unitConfiguration.setEntityReferences(entityReferences);
controllerState.setUnitConfiguration(unitConfiguration);
}