@Test
	public void testImapIdle() throws Exception {
		NonPollingImapSource mailSource = newNonPollingMailSource();
		FileSink fileSink = newFileSink().binary(true);

		mailSource.ensureStarted();

		stream().create(generateStreamName(), "%s | %s", mailSource, fileSink);

		mailSource.sendEmail("from@foo.com", "The Subject", "My body is slim!");

		assertThat(fileSink, eventually(hasContentsThat(equalTo("My body is slim!\r\n"))));
	}
Tests for the mail related sources and sink.

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