assertThat(fileSink, eventually(hasContentsThat(equalTo("My body is slim!\r\n"))));
}
@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"))));
}