@Test
public void testDeleteExpiredSSHCertRecordsNoDir() {

    // make sure the directory does not exist
    ZTSTestUtils.deleteDirectory(new File("/tmp/zts-ssh-tests"));
    FileSSHRecordStore store = new FileSSHRecordStore(new File("/tmp/zts-ssh-tests"));
    FileSSHRecordStoreConnection con = (FileSSHRecordStoreConnection) store.getConnection();
    assertNotNull(con);
    File dir = Mockito.spy(con.rootDir);
    Mockito.when(dir.list()).thenReturn(null);
    con.rootDir = dir;
    assertEquals(con.deleteExpiredSSHCertRecords(0), 0);
}