*/
public class MailCommandTests extends AbstractStreamIntegrationTest {
@Test
public void testImapPoll() throws Exception {
PollingMailSource pollingMailSource = newPollingMailSource();
FileSink fileSink = newFileSink().binary(true);
pollingMailSource.ensureStarted();
stream().create(generateStreamName(), "%s | %s", pollingMailSource, fileSink);
pollingMailSource.sendEmail("from@foo.com", "The Subject", "My body is slim!");
assertThat(fileSink, eventually(hasContentsThat(equalTo("My body is slim!\r\n"))));
}