@Test(expected = IOException.class)
public void testGenerateDirectoryHashWithFile() throws Exception {

    // Create a temp file
    File tempFile = tempFolder.newFile("temp.txt");
    Utils.generateDirectoryHash(null, tempFile.getAbsolutePath(), "");
    Assert.fail("Expected an IOException as we passed it a file");
}