public void test8bitmimeFromStream() throws Exception {
finishSetUp(m_testConfiguration);
outgoingSpool = new InMemorySpoolRepository();
((MockStore) m_serviceManager.lookup(Store.ROLE)).add("outgoing", outgoingSpool);
RemoteDelivery rd = new RemoteDelivery();
MockMailContext mmc = new MockMailContext();
mmc.setAttribute(Constants.AVALON_COMPONENT_MANAGER,m_serviceManager);
mmc.setAttribute(Constants.HELLO_NAME,"localhost");
MockMailetConfig mci = new MockMailetConfig("Test",mmc,getStandardParameters());
mci.setProperty("gateway","127.0.0.1");
mci.setProperty("gatewayPort",""+m_smtpListenerPort);
rd.init(mci);
String sources = "Content-Type: text/plain;\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
//String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: quoted-printable\r\nSubject: test\r\n\r\nBody=80\r\n";
//String sources = "Content-Type: text/plain; charset=iso-8859-15\r\nContent-Transfer-Encoding: 8bit\r\nSubject: test\r\n\r\nBody\u20AC\r\n";
String sender = "test@localhost";
String recipient = "test@localhost";
MimeMessage mm = new MimeMessage(Session.getDefaultInstance(new Properties()),new ByteArrayInputStream(sources.getBytes()));
MailImpl mail = new MailImpl("name",new MailAddress(sender),Arrays.asList(new MailAddress[] {new MailAddress(recipient)}),mm);
rd.service(mail);
while (outgoingSpool.size() > 0) {
Thread.sleep(1000);
}