MDN { public static Builder builder() { return new Builder(); } private  MDN(String humanReadableText, MDNReport report); static Builder builder(); String getHumanReadableText(); MDNReport getReport(); MimeMultipart asMultipart(); MimeMessage asMimeMessage(); BodyPart computeHumanReadablePart(); BodyPart computeReportPart(); Message.Builder asMime4JMessageBuilder(); @Override final boolean equals(Object o); @Override final int hashCode(); static final String DISPOSITION_CONTENT_TYPE; static final String REPORT_SUB_TYPE; static final String DISPOSITION_NOTIFICATION_REPORT_TYPE; }
@Test void reportShouldThrowOnNullValue() { assertThatThrownBy(() -> MDN.builder() .report(null)) .isInstanceOf(NullPointerException.class); }
@Test void humanReadableTextShouldThrowOnNullValue() { assertThatThrownBy(() -> MDN.builder() .humanReadableText(null)) .isInstanceOf(NullPointerException.class); }
@Test void buildShouldThrowOnEmptyHumanReadableText() { assertThatThrownBy(() -> MDN.builder() .humanReadableText("") .report(MINIMAL_REPORT) .build()) .isInstanceOf(IllegalStateException.class); }
@Test void buildShouldThrowOnFoldingWhiteHumanReadableText() { assertThatThrownBy(() -> MDN.builder() .humanReadableText(" ") .report(MINIMAL_REPORT) .build()) .isInstanceOf(IllegalStateException.class); }