@Test
	public void testMailSink() throws Exception {
		HttpSource httpSource = newHttpSource();
		MailSink mailSink = newMailSink();

		mailSink.ensureStarted()
				.to("'\"some.one@domain.com\"'")
				.subject("payload");


		stream().create(generateStreamName(), "%s | %s", httpSource, mailSink);

		httpSource.ensureReady().postData("Woohoo!");
		MimeMessage result = mailSink.waitForEmail();

		Assert.assertEquals("Woohoo!\r\n", result.getContent());
		Assert.assertEquals("Woohoo!", result.getSubject());

	}
Tests for the mail related sources and sink.

@author Eric Bottard
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractMailCommandsTests.java