Buggy code:
public class TestXPathEntityProcessor extends AbstractDataImportHandlerTestCase { boolean simulateSlowReader ; boolean simulateSlowResultProcessor ; int rowsToRead = - 1 ; @ Test public void withFieldsAndXpath ( ) throws Exception { } @ Test public void testMultiValued ( ) throws Exception { } @ Test public void testMultiValuedFlatten ( ) throws Exception { } @ Test public void withFieldsAndXpathStream ( ) throws Exception { } @ Test public void withFieldsAndXpathStreamContinuesOnTimeout ( ) throws Exception { } @ Test public void streamWritesMessageAfterBlockedAttempt ( ) throws Exception { } @ Test public void streamStopsAfterInterrupt ( ) throws Exception { } @ Test public void withDefaultSolrAndXsl ( ) throws Exception { File tmpdir = File . createTempFile ( "test" , "tmp" , TEMP_DIR ) ; tmpdir . delete ( ) ; tmpdir . mkdir ( ) ; tmpdir . deleteOnExit ( ) ; AbstractDataImportHandlerTestCase . createFile ( tmpdir , "x.xsl" , TestXPathEntityProcessor . xsl . getBytes ( "UTF-8" ) , false ) ; <START_BUG> Map entityAttrs = createMap ( "name" , "e" , USE_SOLR_ADD_SCHEMA , "true" , "xsl" , ( "" + ( new File ( tmpdir , "x.xsl" ) . getAbsolutePath ( ) ) ) , "url" , "cd.xml" ) ; <END_BUG> Context c = getContext ( null , new VariableResolverImpl ( ) , getDataSource ( TestXPathEntityProcessor . cdData ) , FULL_DUMP , null , entityAttrs ) ; XPathEntityProcessor xPathEntityProcessor = new XPathEntityProcessor ( ) ; xPathEntityProcessor . init ( c ) ; List < Map < String , Object > > result = new ArrayList < Map < String , Object > > ( ) ; while ( true ) { Map < String , Object > row = xPathEntityProcessor . nextRow ( ) ; if ( row == null ) break ; result . add ( row ) ; } assertEquals ( 3 , result . size ( ) ) ; assertEquals ( "Empire<seq2seq4repair_space>Burlesque" , result . get ( 0 ) . get ( "title" ) ) ; assertEquals ( "Bonnie<seq2seq4repair_space>Tyler" , result . get ( 1 ) . get ( "artist" ) ) ; assertEquals ( "1982" , result . get ( 2 ) . get ( "year" ) ) ; } private DataSource < Reader > getDataSource ( final String xml ) { } private static final String xsl = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?>\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<xsl:stylesheet<seq2seq4repair_space>version=\"1.0\"\n" + "xmlns:xsl=\"http:////www.w3.org//1999//XSL//Transform\">\n" ) + "<xsl:output<seq2seq4repair_space>version=\'1.0\'<seq2seq4repair_space>method=\'xml\'<seq2seq4repair_space>encoding=\'UTF-8\'<seq2seq4repair_space>indent=\'yes\'//>\n" ) + "\n" ) + "<xsl:template<seq2seq4repair_space>match=\"//\">\n" ) + "<seq2seq4repair_space><add><seq2seq4repair_space>\n" ) + "<seq2seq4repair_space><xsl:for-each<seq2seq4repair_space>select=\"catalog//cd\">\n" ) + "<seq2seq4repair_space><doc>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"title\"><xsl:value-of<seq2seq4repair_space>select=\"title\"//><//field>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"artist\"><xsl:value-of<seq2seq4repair_space>select=\"artist\"//><//field>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"country\"><xsl:value-of<seq2seq4repair_space>select=\"country\"//><//field>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"company\"><xsl:value-of<seq2seq4repair_space>select=\"company\"//><//field><seq2seq4repair_space>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"price\"><xsl:value-of<seq2seq4repair_space>select=\"price\"//><//field>\n" ) + "<seq2seq4repair_space><field<seq2seq4repair_space>name=\"year\"><xsl:value-of<seq2seq4repair_space>select=\"year\"//><//field><seq2seq4repair_space>\n" ) + "<seq2seq4repair_space><//doc>\n" ) + "<seq2seq4repair_space><//xsl:for-each>\n" ) + "<seq2seq4repair_space><//add><seq2seq4repair_space>\n" ) + "<//xsl:template>\n" ) + "<//xsl:stylesheet>" ) ; private static final String cdData = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?>\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<?xml-stylesheet<seq2seq4repair_space>type=\"text//xsl\"<seq2seq4repair_space>href=\"solr.xsl\"?>\n" + "<catalog>\n" ) + "\t<cd>\n" ) + "\t\t<title>Empire<seq2seq4repair_space>Burlesque<//title>\n" ) + "\t\t<artist>Bob<seq2seq4repair_space>Dylan<//artist>\n" ) + "\t\t<country>USA<//country>\n" ) + "\t\t<company>Columbia<//company>\n" ) + "\t\t<price>10.90<//price>\n" ) + "\t\t<year>1985<//year>\n" ) + "\t<//cd>\n" ) + "\t<cd>\n" ) + "\t\t<title>Hide<seq2seq4repair_space>your<seq2seq4repair_space>heart<//title>\n" ) + "\t\t<artist>Bonnie<seq2seq4repair_space>Tyler<//artist>\n" ) + "\t\t<country>UK<//country>\n" ) + "\t\t<company>CBS<seq2seq4repair_space>Records<//company>\n" ) + "\t\t<price>9.90<//price>\n" ) + "\t\t<year>1988<//year>\n" ) + "\t<//cd>\n" ) + "\t<cd>\n" ) + "\t\t<title>Greatest<seq2seq4repair_space>Hits<//title>\n" ) + "\t\t<artist>Dolly<seq2seq4repair_space>Parton<//artist>\n" ) + "\t\t<country>USA<//country>\n" ) + "\t\t<company>RCA<//company>\n" ) + "\t\t<price>9.90<//price>\n" ) + "\t\t<year>1982<//year>\n" ) + "\t<//cd>\n" ) + "<//catalog>\t" ) ; private static final String testXml = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><root><a>1<//a><a>2<//a><//root>" ; private static final String testXmlFlatten = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"?><root><a>1<b>B<//b>2<//a><//root>" ; }

Fix:
Map entityAttrs = createMap ( "name" , "e" , USE_SOLR_ADD_SCHEMA , "true" , "xsl" , ( "" + ( new File ( tmpdir , "x.xsl" ) . toURI ( ) ) ) , "url" , "cd.xml" ) ;