### Question:
BetterMimeMessage extends MimeMessage { protected boolean isMessageReport(String contentType) { return contentType.startsWith("multipart/report"); } BetterMimeMessage(MimeMessage message); boolean isSpam(); float getSpamLevel(); boolean isBounced(); static final String SPAM_FLAG_HEADER; static final String SPAM_LEVEL_HEADER; static final String AUTO_SUBMITTED_HEADER; }### Answer:
@Test public void testIsMessageReport() throws MessagingException { MimeMessage report = mock(MimeMessage.class); BetterMimeMessage instance = new BetterMimeMessage(report); String contentType = "multipart/report; report-type=delivery-status;\n\t" + "boundary=\"A3DB01912007.1281602599/zimbra.oevo.com\""; assertTrue(instance.isMessageReport(contentType)); contentType = "message/delivery-status"; assertFalse(instance.isMessageReport(contentType)); contentType = "message/rfc822"; assertFalse(instance.isMessageReport(contentType)); contentType = "text/plain; charset=utf-8"; assertFalse(instance.isMessageReport(contentType)); }