@Test(expected = IOException.class)
public void testSeqfileErrorOnOpen() throws IOException, InterruptedException {

  LOG.info("Exception on open empty file with seqfile");
  File tmpdir = FileUtil.mktempdir();
  tmpdir.deleteOnExit();
  // create empty file.
  File corrupt = new File(tmpdir,
      "walempty.00000000.20091104-101213997-0800.seq");
  LOG.info("corrupt file is named: " + corrupt.getAbsolutePath());
  corrupt.createNewFile();
  corrupt.deleteOnExit();
  // check now, and any age is too old.
  File commit = new File(tmpdir, "committed");
  commit.deleteOnExit();
  EventSource src = new SeqfileEventSource(corrupt.getAbsolutePath());
  try {
    src.open(); // expect IOException
  } catch (IOException e) {
    throw e;
  } finally {
    FileUtil.rmr(tmpdir);
  }
}