Pool extends AbstractHibernateObject<Pool> implements Owned, Named, Comparable<Pool>,
    Eventful, SubscriptionInfo { @JsonIgnore public boolean isOverflowing() { if (this.quantity == -1) { return false; } return getConsumed() > this.quantity; } Pool();  Pool(Owner ownerIn, Product product, Collection<Product> providedProducts,
        Long quantityIn, Date startDateIn, Date endDateIn, String contractNumber,
        String accountNumber, String orderNumber); @Override @HateoasInclude String getId(); void setId(String id); Date getStartDate(); void setStartDate(Date startDate); Date getEndDate(); void setEndDate(Date endDate); Date getLastModified(); Long getQuantity(); void setQuantity(Long quantity); Long getConsumed(); void setConsumed(Long consumed); Long getExported(); void setExported(Long exported); Owner getOwner(); @Override String getOwnerId(); void setOwner(Owner owner); @HateoasInclude String getProductName(); String getDerivedProductName(); String getContractNumber(); void setContractNumber(String contractNumber); String getAccountNumber(); void setAccountNumber(String accountNumber); String getOrderNumber(); void setOrderNumber(String orderNumber); Map<String, String> getAttributes(); @JsonIgnore String getAttributeValue(String key); @JsonIgnore boolean hasAttribute(String key); @JsonIgnore boolean hasProductAttribute(String key); Pool setAttribute(String key, String value); boolean removeAttribute(String key); Pool clearAttributes(); Pool setAttributes(Map<String, String> attributes); boolean hasMergedAttribute(String key); String getMergedAttribute(String key); boolean hasMergedProductAttribute(String key); String getMergedProductAttribute(String key); @JsonIgnore boolean isExpired(DateSource dateSource); boolean entitlementsAvailable(Integer quantityToConsume); @JsonIgnore boolean isUnlimited(); Entitlement getSourceEntitlement(); void setSourceEntitlement(Entitlement sourceEntitlement); @JsonProperty("subscriptionId") String getSubscriptionId(); @JsonIgnore SourceStack getSourceStack(); void setSourceStack(SourceStack sourceStack); Boolean getActiveSubscription(); void setActiveSubscription(Boolean activeSubscription); String toString(); @JsonIgnore Set<Product> getProvidedProducts(); void addProvidedProduct(Product provided); void setProvidedProducts(Collection<Product> providedProducts); @JsonProperty("providedProducts") Set<ProvidedProduct> getProvidedProductDtos(); void setProvidedProductDtos(Set<ProvidedProduct> dtos); @JsonIgnore Set<Product> getDerivedProvidedProducts(); void addDerivedProvidedProduct(Product provided); void setDerivedProvidedProducts(Collection<Product> derivedProvidedProducts); @JsonProperty("derivedProvidedProducts") Set<ProvidedProduct> getDerivedProvidedProductDtos(); void setDerivedProvidedProductDtos(Set<ProvidedProduct> dtos); void populateAllTransientProvidedProducts(ProductCurator productCurator); @HateoasInclude String getProductId(); void setProductId(String productId); void setDerivedProductId(String productId); @JsonIgnore Product getProduct(); @JsonProperty @JsonInclude(JsonInclude.Include.NON_NULL) void setProduct(Product product); @JsonIgnore Set<Entitlement> getEntitlements(); void setEntitlements(Set<Entitlement> entitlements); String getRestrictedToUsername(); void setRestrictedToUsername(String restrictedToUsername); @JsonIgnore boolean isOverflowing(); @JsonProperty("subscriptionSubKey") String getSubscriptionSubKey(); Map<String, String> getCalculatedAttributes(); void setCalculatedAttributes(Map<String, String> calculatedAttributes); @JsonIgnore Product getDerivedProduct(); String getDerivedProductId(); Map<String, String> getProductAttributes(); @Deprecated void setProductAttributes(Map<String, String> attributes); Map<String, String> getDerivedProductAttributes(); @Deprecated void setDerivedProductAttributes(Map<String, String> attributes); @JsonIgnore String getProductAttributeValue(String key); @JsonProperty @JsonInclude(JsonInclude.Include.NON_NULL) void setDerivedProduct(Product derived); @JsonProperty("sourceStackId") String getSourceStackId(); PoolType getType(); @JsonIgnore PoolComplianceType getComplianceType(); boolean isStacked(); String getStackId(); @JsonIgnore boolean isUnmappedGuestPool(); boolean isDevelopmentPool(); @JsonIgnore SourceSubscription getSourceSubscription(); @JsonIgnore void setSourceSubscription(SourceSubscription sourceSubscription); void setSubscriptionId(String subid); void setSubscriptionSubKey(String subkey); @JsonIgnore long adjustQuantity(long quantityToAdjust); @JsonIgnore static Long parseQuantity(String quantity); @Override int compareTo(Pool other); @Override @JsonIgnore String getName(); @JsonIgnore boolean isMarkedForDelete(); void setMarkedForDelete(boolean markedForDelete); String getUpstreamPoolId(); void setUpstreamPoolId(String upstreamPoolId); String getUpstreamEntitlementId(); void setUpstreamEntitlementId(String upstreamEntitlementId); String getUpstreamConsumerId(); void setUpstreamConsumerId(String upstreamConsumerId); Cdn getCdn(); void setCdn(Cdn cdn); @JsonIgnore SubscriptionsCertificate getCertificate(); void setCertificate(SubscriptionsCertificate cert); boolean isLocked(); void setLocked(boolean locked); static final String DB_TABLE; }
@Test public void testIsOverflowing() { Pool duplicatePool = createPool( owner, prod1, -1L, TestUtil.createDate(2009, 11, 30), TestUtil.createDate(2050, 11, 30) ); assertFalse(duplicatePool.isOverflowing()); }