### Question:
SoapFolderService extends AbstractService implements FolderService { @Override public void move(String sid, long folderId, long parentId) throws Exception { User user = validateSession(sid); FolderDAO folderDao = (FolderDAO) Context.get().getBean(FolderDAO.class); if (parentId == folderDao.findRoot(user.getTenantId()).getId()) { log.error("Cannot move folders in the root"); throw new Exception("Cannot move folders in the root"); } Folder destParentFolder = folderDao.findById(parentId); Folder folderToMove = folderDao.findById(folderId); if (parentId == folderToMove.getParentId()) throw new SecurityException("No Changes"); if (parentId == folderToMove.getId()) throw new SecurityException("Not Allowed"); Folder sourceParent = folderDao.findById(folderToMove.getParentId()); boolean sourceParentDeleteEnabled = folderDao.isPermissionEnabled(Permission.DELETE, sourceParent.getId(), user.getId()); if (!sourceParentDeleteEnabled) throw new SecurityException("No rights to delete folder"); boolean addEnabled = folderDao.isPermissionEnabled(Permission.ADD, destParentFolder.getId(), user.getId()); if (!addEnabled) throw new SecurityException("Add Rights not granted on the target folder"); FolderHistory transaction = new FolderHistory(); transaction.setSessionId(sid); transaction.setUser(user); folderDao.move(folderToMove, destParentFolder, transaction); }  @Override WSFolder create(String sid, WSFolder folder); @Override WSFolder createAlias(String sid, long parentId, long foldRef); @Override long createFolder(String sid, long parentId, String name); @Override void delete(String sid, long folderId); @Override WSFolder getFolder(String sid, long folderId); @Override WSFolder findByPath(String sid, String path); @Override boolean isReadable(String sid, long folderId); @Override WSFolder[] listChildren(String sid, long folderId); @Override void move(String sid, long folderId, long parentId); @Override void copy(String sid, long folderId, long targetId, int foldersOnly, int inheritSecurity); @Override void rename(String sid, long folderId, String name); @Override WSFolder getRootFolder(String sid); @Override WSFolder getDefaultWorkspace(String sid); @Override boolean isWritable(String sid, long folderId); @Override boolean isGranted(String sid, long folderId, int permission); @Override WSFolder[] getPath(String sid, long folderId); @Override void grantUser(String sid, long folderId, long userId, int permissions, boolean recursive); @Override void grantGroup(String sid, long folderId, long groupId, int permissions, boolean recursive); @Override WSRight[] getGrantedUsers(String sid, long folderId); @Override WSRight[] getGrantedGroups(String sid, long folderId); @Override void update(String sid, WSFolder folder); @Override WSFolder createPath(String sid, long parentId, String path); @Override WSFolder[] listWorkspaces(String sid);  }### Answer:
@Test public void testMove() throws Exception { Folder folderToMove = folderDao.findById(1203); Assert.assertNotNull(folderToMove); Assert.assertEquals(1201, folderToMove.getParentId()); Folder parentFolder = folderDao.findById(1200); Assert.assertNotNull(parentFolder); folderServiceImpl.move("", folderToMove.getId(), 1200L); folderToMove = folderDao.findById(1203); Assert.assertEquals(1200, folderToMove.getParentId()); }