private void testFileSinkSource(String nameExpressionParam, String dirPrefix, String dirSuffix) throws Exception {
		// Are we on *nix at least?
		if (!new File("/tmp/").exists()) {
			return;
		}

		// Both use stream name
		String streamName = generateStreamName();

		File inDir = new File(DEFAULT_IN, streamName);
		inDir.mkdirs();
		File in = new File(inDir, "one.txt");
		File outDir = new File("/tmp/" + dirPrefix + "hello" + dirSuffix);
		File out = new File(outDir, "hello");

		try {
			FileCopyUtils.copy("hello", new FileWriter(in));
			String dirExpression = " --dirExpression='''/tmp/'' + ''" + dirPrefix + "'' + payload.trim() + ''"
					+ dirSuffix + "'''";
			stream().create(streamName, "in: file --outputType=text/plain | out: file " + nameExpressionParam +
					dirExpression);
			Thread.sleep(1000);
			String actual = FileCopyUtils.copyToString(new FileReader(out));
			assertEquals("hello", actual.trim());
			assertEquals(out.exists(), true);
		}
		finally {
			in.delete();
			in.getParentFile().delete();
			out.delete();
			outDir.delete();
		}
	}
Tests to explicitly assert file related source and sink behavior.

@author Eric Bottard
@author David Turanski
@author Franck Marchand
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractFileSourceAndFileSinkTests.java