public static File tempFile(final String contents) throws IOException {
        final File file = tempFile();
        Files.write(file.toPath(), contents.getBytes(StandardCharsets.UTF_8));
        return file;
    }
Create a file with the given contents in the default temporary-file directory,
using `kafka` as the prefix and `tmp` as the suffix to generate its name.
clients/src/test/java/org/apache/kafka/test/TestUtils.java