@Test
public void testSnappyStreamProvider() throws IOException
{

  if (checkNativeSnappy()) {
    return;
  }
  EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
  writer.setFilterStreamProvider(new FilterStreamCodec.SnappyFilterStreamProvider());
  File evenFile = new File(testMeta.getDir(), EVEN_FILE);
  File oddFile = new File(testMeta.getDir(), ODD_FILE);
  // To get around the multi member gzip issue with openjdk
  // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4691425
  List<Long> evenOffsets = new ArrayList<Long>();
  List<Long> oddOffsets = new ArrayList<Long>();
  writeCompressedData(writer, evenFile, oddFile, evenOffsets, oddOffsets);
  checkSnappyFile(evenFile, evenOffsets, 0, 5, 1000);
  checkSnappyFile(oddFile, oddOffsets, 1, 5, 1000);
}