public void testLoadFromBindTo() throws Exception {
String filename = TestHelper.createTempFile(data, " ");
CommonLogLoader commonLogLoader = new CommonLogLoader();
PigContext pigContext = new PigContext(ExecType.LOCAL, new Properties());
InputStream inputStream = FileLocalizer.open(filename, pigContext);
commonLogLoader.bindTo(filename, new BufferedPositionedInputStream(inputStream), 0, Long.MAX_VALUE);
int tupleCount = 0;
while (true) {
Tuple tuple = commonLogLoader.getNext();