void (String targetDirName, String fileToMove) { doTest(() -> { VirtualFile child = myFixture.findFileInTempDir(fileToMove); assertNotNull("File " + fileToMove + " not found", child); PsiFile file = getPsiManager().findFile(child); assertNotNull(file); VirtualFile child1 = myFixture.findFileInTempDir(targetDirName); assertNotNull("File " + targetDirName + " not found", child1); PsiDirectory targetDirectory = getPsiManager().findDirectory(child1); assertNotNull(targetDirectory); new MoveFilesOrDirectoriesProcessor(getProject(), new PsiElement[]{file}, targetDirectory, false, false, null, null).run(); int index = fileToMove.lastIndexOf("/"); PsiFile psiFile = targetDirectory.findFile(index == -1 ? fileToMove : fileToMove.substring(index + 1)); assertNotNull(psiFile); }); }