public static boolean isFolderEmpty(File folder) {
        if (folder == null) {
            return true;
        }
        File[] files = folder.listFiles();
        return files == null || files.length == 0;
    }
@Test
    void folderIsEmptyWhenItHasNoContents() {
        assertThat(FileUtil.isFolderEmpty(folder)).isTrue();
    }