@@ -0,0 +1,1931 @@
+package com.vidal.handyWarup;%0A%0Aimport org.assertj.core.api.Assertions;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.DirectoryNotEmptyException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0A%0Aimport static java.nio.charset.StandardCharsets.UTF_8;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.hamcrest.CoreMatchers.isA;%0A%0Apublic class FsDeepCopyTest %7B%0A%0A   @Rule%0A   public TemporaryFolder folder = new TemporaryFolder();%0A%0A   @Rule%0A   public ExpectedException thrown = ExpectedException.none();%0A%0A   FsDeepCopy deepCopy = new FsDeepCopy();%0A%0A   @Test%0A   public void overwrites_single_file() throws IOException %7B%0A      Path file = folder.newFile(%22foo%22).toPath();%0A      write(file, %22Hello world!%22);%0A      Path target = folder.newFile(%22bar%22).toPath();%0A%0A      deepCopy.accept(file, target);%0A%0A      assertThat(target)%0A         .exists()%0A         .hasContent(%22Hello world!%22);%0A   %7D%0A%0A   @Test%0A   public void cannot_overwrite_nonempty_directory() throws IOException %7B%0A      Path directory = folder.newFolder(%22baz%22).toPath();%0A      write(%0A         create(new File(directory.toFile(), %22foobar%22)).toPath(),%0A         %22Hello world!%22%0A      );%0A      Path target = folder.newFolder(%22qux%22).toPath();%0A      File targetFile = new File(target.toFile(), %22foobar%22);%0A      write(%0A         create(targetFile).toPath(),%0A         %22Bonjour le monde!%22%0A      );%0A%0A      thrown.expectCause(isA(DirectoryNotEmptyException.class));%0A      deepCopy.accept(directory, target);%0A   %7D%0A%0A   private void write(Path path, String string) throws IOException %7B%0A      Files.write(path, string.getBytes(UTF_8));%0A   %7D%0A%0A   private File create(File file) throws IOException %7B%0A      if (!file.createNewFile()) %7B%0A         Assertions.fail(%22Could not create file%22);%0A      %7D%0A      return file;%0A   %7D%0A%7D

Add more coverage on file deep copy guarantees