@Test
	public void testFileContentsUsingDefaultMode() throws IOException {
		deployStream(
				"filecontentsdefault",
				"file --dir=" + sourceDirName + " --fixedDelay=0 | sink");
		MessageTest test = new MessageTest() {

			@Override
			public void test(Message<?> message) throws MessagingException {
				byte[] bytes = (byte[]) message.getPayload();
				assertEquals("foo", new String(bytes));
				assertEquals("foo.txt", message.getHeaders().get(FileHeaders.FILENAME, String.class));
				assertEquals(MimeType.valueOf("application/octet-stream"),
						contentTypeResolver.resolve(message.getHeaders()));
			}
		};
		StreamTestSupport.getSinkInputChannel("filecontentsdefault").subscribe(test);
		dropFile("foo.txt");
		test.waitForCompletion(1000);
		undeployStream("filecontentsdefault");
		assertTrue(test.getMessageHandled());
	}
@author David Turanski
@author Gunnar Hillert
@author Gary Russell
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/stream/FileSourceModuleTests.java