tmpDir.delete();
}
@Test
public void testPutFilenameHeader() throws IOException, InterruptedException {
Context context = new Context();
File f1 = new File(tmpDir.getAbsolutePath() + "/file1");
Files.write("file1line1\nfile1line2\nfile1line3\nfile1line4\n" +
"file1line5\nfile1line6\nfile1line7\nfile1line8\n",
f1, Charsets.UTF_8);
context.put(SpoolDirectorySourceConfigurationConstants.SPOOL_DIRECTORY,
tmpDir.getAbsolutePath());
context.put(SpoolDirectorySourceConfigurationConstants.FILENAME_HEADER,
"true");
context.put(SpoolDirectorySourceConfigurationConstants.FILENAME_HEADER_KEY,
"fileHeaderKeyTest");
Configurables.configure(source, context);
source.start();
Thread.sleep(500);