File testFile = File.createTempFile("testPigLineRecordReader", ".txt");
LocalSeekableInputStream is = new LocalSeekableInputStream( testFile );
BufferedPositionedInputStream bpis = new BufferedPositionedInputStream( is );
PigLineRecordReader reader = new PigLineRecordReader( bpis, 0, Integer.MAX_VALUE );
Field lineReader = reader.getClass().getDeclaredField("lineReader");
lineReader.setAccessible(true);
Object lineReaderObj = lineReader.get(reader);
assertTrue( "Expected a PigLineRecordReader.BufferingLineReader",
lineReaderObj instanceof PigLineRecordReader.BufferingLineReader );
testFile.deleteOnExit();