@Test
public void testScanDirectory() throws Exception {

  Path p = new Path("any");
  FileContext fc = mock(FileContext.class);
  when(fc.makeQualified(p)).thenReturn(p);
  when(fc.listStatus(p)).thenThrow(new FileNotFoundException());
  List<FileStatus> lfs = HistoryFileManager.scanDirectory(p, fc, null);
  //primarily, succcess is that an exception was not thrown.  Also nice to
  //check this
  Assert.assertNotNull(lfs);
}