### Question:
FetchInstruction { public boolean mustTruncate() { if (truncation != null) { return mimePart.getSize() > truncation; } return false; } private  FetchInstruction(MimePart mimePart, Integer truncation, MSEmailBodyType bodyType, MailTransformation mailTransformation); static Builder builder(); MimePart getMimePart(); Integer getTruncation(); MSEmailBodyType getBodyType(); MailTransformation getMailTransformation(); boolean hasMimePartAddressDefined(); boolean mustTruncate(); @Override final int hashCode(); @Override final boolean equals(Object object); @Override String toString();  }### Answer:
@Test public void testMustTruncate() { MimePart mimePart = createStrictMock(MimePart.class); expect(mimePart.getSize()).andReturn(10000); replay(mimePart); FetchInstruction fetchInstruction = createFetchInstruction(100, mimePart); assertThat(fetchInstruction.mustTruncate()).isTrue(); verify(mimePart); }
@Test public void testNullTruncation() { MimePart mimePart = createStrictMock(MimePart.class); replay(mimePart); FetchInstruction fetchInstruction = createFetchInstruction(null, mimePart); assertThat(fetchInstruction.mustTruncate()).isFalse(); verify(mimePart); }
@Test public void testNotTruncated() { MimePart mimePart = createStrictMock(MimePart.class); expect(mimePart.getSize()).andReturn(10); replay(mimePart); FetchInstruction fetchInstruction = createFetchInstruction(100, mimePart); assertThat(fetchInstruction.mustTruncate()).isFalse(); verify(mimePart); }