@Test
public void copyFailsDirectoryType() throws IOException {

    Map<String, File> files = new HashMap<String, File>();
    files.put("newName", folder.newFile());
    try {
        OutputWriterHelper.moveToDirectory(files, folder.newFile(), ExistingOutputPolicy.OVERWRITE, context);
        fail("Exception expected");
    } catch (IOException e) {
        assertTrue("Different exception expected.", e.getMessage().startsWith("Wrong output destination"));
    }
}