### Question:
FolderDao extends NamedParameterJdbcDaoSupport { public List<FolderWithMetadata> loadParentFolders(Long folderId) { List<FolderWithMetadata> items = getJdbcTemplate().query(loadParentFoldersQuery, FolderParameters.getRowMapperWithMetadata(), folderId); return CollectionUtils.isEmpty(items) ? null : items; }  @Transactional(propagation = Propagation.MANDATORY) Long createFolderId(); @Transactional(propagation = Propagation.MANDATORY) void createFolder(Folder folder); @Transactional(propagation = Propagation.MANDATORY) void updateFolder(Folder folder); List<Folder> loadAllFolders(); Folder loadFolder(Long id); List<Folder> loadAllProjects(Map<String, PipeConfValue> projectIndicator); Folder loadFolderByName(String name); Folder loadFolderByNameAndParentId(String name, Long parentId); List<FolderWithMetadata> loadParentFolders(Long folderId); List<Folder> loadFolderWithParents(final Long id); @Transactional(propagation = Propagation.MANDATORY) void deleteFolder(Long id); @Transactional(propagation = Propagation.MANDATORY) void updateLocks(List<Long> folderIds, boolean isLocked); @Required void setFolderSequence(String folderSequence); @Required void setCreateFolderQuery(String createFolderQuery); @Required void setUpdateFolderQuery(String updateFolderQuery); @Required void setLoadAllFoldersQuery(String loadAllFoldersQuery); @Required void setDeleteFolderQuery(String deleteFolderQuery); @Required void setLoadFolderByIdQuery(String loadFolderByIdQuery); @Required void setLoadFolderByNameQuery(String loadFolderByNameQuery); @Required void setLoadFolderByNameAndParentIdQuery(String loadFolderByNameAndParentIdQuery); @Required void setLoadParentFoldersQuery(String loadParentFoldersQuery); @Required void setUpdateFolderLocksQuery(String updateFolderLocksQuery); @Required void setLoadAllProjectsQuery(String loadAllProjectsQuery);  }### Answer:
@Test @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) public void testLoadParentFolders() { Folder folder = getFolder(); Folder folder1 = createFolderWithParent(folder, "folder1"); Folder folder2 = createFolderWithParent(folder1, "folder2"); createFolderWithParent(folder1, "folder3"); List<Folder> expectedFolders = Stream.of(folder, folder1, folder2).collect(Collectors.toList()); List<FolderWithMetadata> expectedFoldersWithMetadata = createObjectMetadata( expectedFolders); List<FolderWithMetadata> actualFoldersWithMetadata = folderDao.loadParentFolders(folder2.getId()); assertTrue(CollectionUtils.isEqualCollection(actualFoldersWithMetadata, expectedFoldersWithMetadata)); List<Folder> actualFolders = folderDao.loadFolderWithParents(folder2.getId()); assertTrue(CollectionUtils.isEqualCollection(actualFolders, expectedFolders)); }