### Question:
DefaultFileSystemUtils implements com.github.approval.utils.FileSystemUtils { @Override public void move(Path path, Path filePath) throws IOException { if (Files.exists(filePath)) { Files.delete(filePath); } Files.move(path, filePath); }  @Override void write(Path path, byte[] value); @Override byte[] readFully(Path path); @Override void move(Path path, Path filePath); @Override void createDirectories(File directory); @Override void touch(Path pathToCreate);  }### Answer:
@Test public void shouldProperlyMovePaths() throws Exception { final Path source = testFile.newFile("path-source").toPath(); final Path destination = testFile.getRoot().toPath().resolve("path-destination"); Assert.assertThat(destination.toFile().exists(), equalTo(false)); new DefaultFileSystemUtils().move(source, destination); Assert.assertThat(destination.toFile().exists(), equalTo(true)); }
@Test public void shouldDeleteDestinationIfItExistsOnMove() throws Exception { final Path source = testFile.newFile("path-source").toPath(); final Path destination = testFile.newFile("path-destination").toPath(); new DefaultFileSystemUtils().move(source, destination); Assert.assertThat(destination.toFile().exists(), equalTo(true)); }