MailQueueDTO { public static Builder builder() { return new Builder(); } private  MailQueueDTO(String name, long size); static Builder builder(); static MailQueueDTO from(ManageableMailQueue mailQueue); String getName(); long getSize();  }
@Test public void buildShouldThrowWhenNameIsNull() { assertThatThrownBy(() -> MailQueueDTO.builder().build()) .isInstanceOf(IllegalArgumentException.class); }
@Test public void buildShouldThrowWhenNameIsEmpty() { assertThatThrownBy(() -> MailQueueDTO.builder().name("").build()) .isInstanceOf(IllegalArgumentException.class); }