@Test void checkOverQuotaShouldNotThrowWhenNoLimit() throws Exception { new SieveQuota(CURRENT_USAGE, Optional.empty()).checkOverQuotaUponModification(SIZE_DIFFERENCE); }
public void checkOverQuotaUponModification(long sizeDifference) throws QuotaExceededException { if (isExceededUponModification(sizeDifference)) { throw new QuotaExceededException(); } }
SieveQuota { public void checkOverQuotaUponModification(long sizeDifference) throws QuotaExceededException { if (isExceededUponModification(sizeDifference)) { throw new QuotaExceededException(); } } }
SieveQuota { public void checkOverQuotaUponModification(long sizeDifference) throws QuotaExceededException { if (isExceededUponModification(sizeDifference)) { throw new QuotaExceededException(); } } SieveQuota(long currentUsage, Optional<QuotaSizeLimit> limit); }
SieveQuota { public void checkOverQuotaUponModification(long sizeDifference) throws QuotaExceededException { if (isExceededUponModification(sizeDifference)) { throw new QuotaExceededException(); } } SieveQuota(long currentUsage, Optional<QuotaSizeLimit> limit); void checkOverQuotaUponModification(long sizeDifference); boolean isExceededUponModification(long sizeDifference); }
SieveQuota { public void checkOverQuotaUponModification(long sizeDifference) throws QuotaExceededException { if (isExceededUponModification(sizeDifference)) { throw new QuotaExceededException(); } } SieveQuota(long currentUsage, Optional<QuotaSizeLimit> limit); void checkOverQuotaUponModification(long sizeDifference); boolean isExceededUponModification(long sizeDifference);  }