public class TextFileDataSourceTest extends TestCase {
public void testWithXMLChars() throws Exception {
String testString = "Test string with ampersand (&)";
OMDataSource dataSource
= new TextFileDataSource(new ByteArrayDataSource(testString.getBytes("UTF-8")));
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMSourcedElementImpl element
= new OMSourcedElementImpl(BaseConstants.DEFAULT_TEXT_WRAPPER, omFactory, dataSource);
assertEquals(testString, element.getText());
}