### Question:
Files { public static boolean createFileIfMissing(Path path, FileAttribute<?>... attrs) throws IOException { requireNonNull(path); try { java.nio.file.Files.createFile(path, attrs); } catch (FileAlreadyExistsException e) { return false; } return true; } private  Files(); static boolean createFileIfMissing(Path path, FileAttribute<?>... attrs); static void deleteRecursively(Path directory); static Path copyResource(String resourceName, Path destination, OpenOption... options); static Path copyResource(ClassLoader classloader, String resourceName, Path destination, OpenOption... options); static long copyResource(String resourceName, OutputStream out); static long copyResource(ClassLoader classloader, String resourceName, OutputStream out); static void atomicReplace(Path path, byte[] bytes); static void atomicReplace(Path path, IOConsumer<Writer> fn); static void atomicReplace(Path path, Charset charset, IOConsumer<Writer> fn);  }### Answer:
@Test void testCreateFileIfMissing(@TempDirectory Path tempDir) throws Exception { Path p = tempDir.resolve("foo"); assertFalse(p.toFile().exists()); createFileIfMissing(p); assertTrue(p.toFile().exists()); assertEquals(0, Files.size(p)); Files.write(p, "foo".getBytes(StandardCharsets.UTF_8)); assertEquals(3, Files.size(p)); createFileIfMissing(p); assertEquals(3, Files.size(p)); }