@Test void buildShouldThrowWhenMailQueueNameIsNull() { assertThatThrownBy(() -> EnqueuedItem.builder() .enqueueId(EnqueueId.generate()) .mailQueueName(null) .mail(mail) .enqueuedTime(enqueuedTime) .mimeMessagePartsId(partsId) .build()) .isInstanceOf(NullPointerException.class); }
public static Builder.RequireEnqueueId builder() { return enqueueId -> queueName -> mail -> enqueuedTime -> partsId -> new Builder.ReadyToBuild(enqueueId, queueName, mail, enqueuedTime, partsId); }
EnqueuedItem { public static Builder.RequireEnqueueId builder() { return enqueueId -> queueName -> mail -> enqueuedTime -> partsId -> new Builder.ReadyToBuild(enqueueId, queueName, mail, enqueuedTime, partsId); } }
EnqueuedItem { public static Builder.RequireEnqueueId builder() { return enqueueId -> queueName -> mail -> enqueuedTime -> partsId -> new Builder.ReadyToBuild(enqueueId, queueName, mail, enqueuedTime, partsId); } EnqueuedItem(EnqueueId enqueueId, MailQueueName mailQueueName, Mail mail, Instant enqueuedTime, MimeMessagePartsId partsId); }
EnqueuedItem { public static Builder.RequireEnqueueId builder() { return enqueueId -> queueName -> mail -> enqueuedTime -> partsId -> new Builder.ReadyToBuild(enqueueId, queueName, mail, enqueuedTime, partsId); } EnqueuedItem(EnqueueId enqueueId, MailQueueName mailQueueName, Mail mail, Instant enqueuedTime, MimeMessagePartsId partsId); static Builder.RequireEnqueueId builder(); EnqueueId getEnqueueId(); MailQueueName getMailQueueName(); Mail getMail(); Instant getEnqueuedTime(); MimeMessagePartsId getPartsId(); @Override final boolean equals(Object o); @Override final int hashCode(); }
EnqueuedItem { public static Builder.RequireEnqueueId builder() { return enqueueId -> queueName -> mail -> enqueuedTime -> partsId -> new Builder.ReadyToBuild(enqueueId, queueName, mail, enqueuedTime, partsId); } EnqueuedItem(EnqueueId enqueueId, MailQueueName mailQueueName, Mail mail, Instant enqueuedTime, MimeMessagePartsId partsId); static Builder.RequireEnqueueId builder(); EnqueueId getEnqueueId(); MailQueueName getMailQueueName(); Mail getMail(); Instant getEnqueuedTime(); MimeMessagePartsId getPartsId(); @Override final boolean equals(Object o); @Override final int hashCode();  }