File (@NotNull List<TestFile> files) { List<TestFile> javaFiles = CollectionsKt.filter(files, file -> file.name.endsWith(".java")); if (javaFiles.isEmpty()) return null; File dir = getJavaSourcesOutputDirectory(); for (TestFile testFile : javaFiles) { File file = new File(dir, testFile.name); KotlinTestUtils.mkdirs(file.getParentFile()); FilesKt.writeText(file, testFile.content, Charsets.UTF_8); } return dir; }