@Test
void filterParentFolderFoldersWithPartialNames() {

    Bundle bundle = FilterTestUtils.getBundle();
    Folder folder1 = createFolder("my", "1", Folder.ROOT_FOLDER);
    Folder folder2 = createFolder("folder", "2", folder1);
    Folder folder3 = createFolder("path", "3", folder2);
    bundle.addEntity(folder1);
    bundle.addEntity(folder2);
    bundle.addEntity(createFolder("fold", "5", folder1));
    bundle.addEntity(folder3);
    bundle.addEntity(createFolder("pa", "6", folder2));
    bundle.addEntity(createFolder("sub-folder", "4", folder3));
    bundle.setFolderTree(new FolderTree(bundle.getEntities(Folder.class).values()));
    List<Folder> parentFolders = FolderFilter.parentFolders("/my/folder/path", bundle);
    assertEquals(4, parentFolders.size());
    assertTrue(parentFolders.stream().anyMatch(f -> "Root Node".equals(f.getName())));
    assertTrue(parentFolders.stream().anyMatch(f -> "my".equals(f.getName())));
    assertTrue(parentFolders.stream().anyMatch(f -> "folder".equals(f.getName())));
    assertTrue(parentFolders.stream().anyMatch(f -> "path".equals(f.getName())));
}