void () { doTest(() -> { final HashMap<PsiFile, PsiClass[]> map = new HashMap<>(); final VirtualFile sourceDir = myFixture.findFileInTempDir("p1"); for (VirtualFile file : sourceDir.getChildren()) { final PsiFile psiFile = getPsiManager().findFile(file); if (psiFile instanceof PsiJavaFile) { map.put(psiFile, ((PsiJavaFile)psiFile).getClasses()); } } final VirtualFile targetVDir = myFixture.findFileInTempDir("p2"); WriteCommandAction.runWriteCommandAction(getProject(), () -> { CopyClassesHandler.doCopyClasses(map, null, getPsiManager().findDirectory(targetVDir), getProject()); }); }, "multifile/" + getTestName(true)); }