Assert.assertFalse(dst.exists());
new File(cwd, fileName).mkdirs(); // will be auto deleted!
Files.write("wrong msg", new File(new File(cwd, fileName), fileName), Charsets.UTF_8); // will be auto deleted!
Command morphline = createMorphline("test-morphlines/testDownloadHdfsFile", inputFile, cwd);
Assert.assertTrue(morphline.process(new Record()));
Assert.assertEquals(msg, Files.toString(dst, Charsets.UTF_8));
if (isDir) {
FileUtil.fullyDelete(dst.getParentFile());
} else {
FileUtil.fullyDelete(dst);