@Test
public void testIsDirectory() throws IOException {

    // Same file with a trailing separator
    FileURL tempFileURLB = (FileURL)tempFile.getURL().clone();
    tempFileURLB.setPath(tempFile.addTrailingSeparator(tempFileURLB.getPath()));
    AbstractFile tempFileB = FileFactory.getFile(tempFileURLB, true);
    // Assert that isDirectory() returns false when the file does not exist
    assert !tempFile.exists();
    assert !tempFile.isDirectory();
    assert !tempFileB.exists();
    assert !tempFileB.isDirectory();
    // Assert that isDirectory() returns true for directories
    tempFile.mkdir();
    assert tempFile.exists();
    assert tempFile.isDirectory();
    assert tempFileB.exists();
    assert tempFileB.isDirectory();
    // Assert that isDirectory() returns false for regular files
    tempFile.delete();
    assert !tempFile.exists();
    assert !tempFile.isDirectory();
    assert !tempFileB.exists();
    assert !tempFileB.isDirectory();
    tempFile.mkfile();
    assert tempFile.exists();
    assert !tempFile.isDirectory();
    assert tempFile.exists();
    assert !tempFileB.isDirectory();
}