msg.setSubject(complexSubject); assertEquals(msg.getSubject(), mungedSubject);
    public void testSetSubject() throws MessagingException {        MimeMessage msg = new MimeMessage(session);        String simpleSubject = "Yada, yada";        String complexSubject = "Yada, yada\u0081";        String mungedSubject = "Yada, yada\u003F";        msg.setSubject(simpleSubject);        assertEquals(msg.getSubject(), simpleSubject);        msg.setSubject(complexSubject, "UTF-8");        assertEquals(msg.getSubject(), complexSubject);        msg.setSubject(complexSubject);        assertEquals(msg.getSubject(), mungedSubject);        msg.setSubject(null);        assertNull(msg.getSubject());    }