@Test
public void moveToDirExsistingOverwrite() throws TaskOutputVisitException, IOException {

    File existing = folder.newFile();
    assertEquals(0, existing.length());
    DefaultMultipleOutputWriter victim = new DefaultMultipleOutputWriter(ExistingOutputPolicy.OVERWRITE, context);
    Path outFile = Files.createTempFile("sejda", ".tmp");
    Files.write(outFile, new byte[] { 0, 1, 1, 1 });
    victim.addOutput(FileOutput.file(outFile.toFile()).name(existing.getName()));
    new DirectoryTaskOutput(existing.getParentFile()).accept(victim);
    assertEquals(1, existing.getParentFile().list().length);
    assertEquals(4, existing.getParentFile().listFiles()[0].length());
    Files.deleteIfExists(outFile);
}