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

			@Override
			public void test(Message<?> message) throws MessagingException {
				File file = (File) message.getPayload();
				assertEquals(sourceDirName + File.separator + "foo1.txt", file.getAbsolutePath());
			}
		};
		StreamTestSupport.getSinkInputChannel("fileref").subscribe(test);
		dropFile("foo1.txt");
		test.waitForCompletion(1000);
		StreamTestSupport.getDeployedModule("fileref", 0).stop();
		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