@Test
public void testSetDataHandler() throws Exception {

sion s = Session.getInstance(new Properties());
create a message and extract the DataHandler for a part
eMessage orig = createMessage(s);
al DataHandler odh = orig.getDataHandler();
create a new message and use the DataHandler
eMessage msg = new MimeMessage(s) {
dh = odh; }
 };
depend on copy constructor streaming the data
 = new MimeMessage(msg);
ertEquals("text/x-test", msg.getContentType());
ertEquals("quoted-printable", msg.getEncoding());
ertEquals("test message", getString(msg.getInputStream()));
}