@Test void buildShouldFilterOutNotInterestingFields() { Quota<QuotaSizeLimit, QuotaSizeUsage> sizeQuota = Sizes._82_PERCENT; Quota<QuotaCountLimit, QuotaCountUsage> countQuota = Counts._82_PERCENT; QuotaThresholdChange sizeThresholdChange = new QuotaThresholdChange(_80, NOW); QuotaThresholdChange countThresholdChange = new QuotaThresholdChange(_80, NOW); assertThat(QuotaThresholdNotice.builder() .withConfiguration(DEFAULT_CONFIGURATION) .sizeQuota(sizeQuota) .countQuota(countQuota) .sizeThreshold(HistoryEvolution.higherThresholdReached(sizeThresholdChange, NotAlreadyReachedDuringGracePeriod)) .countThreshold(HistoryEvolution.lowerThresholdReached(countThresholdChange)) .build()) .isNotEmpty() .contains(new QuotaThresholdNotice(Optional.empty(), Optional.of(sizeThresholdChange.getQuotaThreshold()), sizeQuota, countQuota, DEFAULT_CONFIGURATION)); }
public static Builder builder() { return new Builder(); }
QuotaThresholdNotice { public static Builder builder() { return new Builder(); } }
QuotaThresholdNotice { public static Builder builder() { return new Builder(); } @VisibleForTesting  QuotaThresholdNotice(Optional<QuotaThreshold> countThreshold, Optional<QuotaThreshold> sizeThreshold,
                         Quota<QuotaSizeLimit, QuotaSizeUsage> sizeQuota, Quota<QuotaCountLimit, QuotaCountUsage> countQuota, QuotaMailingListenerConfiguration configuration); }
QuotaThresholdNotice { public static Builder builder() { return new Builder(); } @VisibleForTesting  QuotaThresholdNotice(Optional<QuotaThreshold> countThreshold, Optional<QuotaThreshold> sizeThreshold,
                         Quota<QuotaSizeLimit, QuotaSizeUsage> sizeQuota, Quota<QuotaCountLimit, QuotaCountUsage> countQuota, QuotaMailingListenerConfiguration configuration); static Builder builder(); MimeMessageBuilder generateMimeMessage(FileSystem fileSystem); @Override final boolean equals(Object o); @Override final int hashCode(); }
QuotaThresholdNotice { public static Builder builder() { return new Builder(); } @VisibleForTesting  QuotaThresholdNotice(Optional<QuotaThreshold> countThreshold, Optional<QuotaThreshold> sizeThreshold,
                         Quota<QuotaSizeLimit, QuotaSizeUsage> sizeQuota, Quota<QuotaCountLimit, QuotaCountUsage> countQuota, QuotaMailingListenerConfiguration configuration); static Builder builder(); MimeMessageBuilder generateMimeMessage(FileSystem fileSystem); @Override final boolean equals(Object o); @Override final int hashCode();  }