public void testDelete() {
FolderEntity folder = folderTool.addFolder("test");
fileTool.addFile("title1", "test.bat1", "text/plain",
"file content1".getBytes(), folder);
FileEntity file = fileTool.addFile("title2", "test.bat2", "text/plain",
"file content2".getBytes(), folder);
fileTool.addFile("title3", "test.bat3", "text/plain", "file content3".getBytes(), folder);
folder = getDao().getFolderDao().getById(folder.getId());
List<FileEntity> files = getDao().getFileDao().getByFolder(folder.getId());
assertEquals(3, files.size());
getDao().getFileDao().remove(file.getId());
folder = getDao().getFolderDao().getById(folder.getId());
List<FileEntity> list = getDao().getFileDao().getByFolder(folder.getId());
assertEquals(2, list.size());
Long id = null;
getDao().getFileDao().remove(id);