assertEquals(range2.getEndDate(), validRange.getEndDate());
}
@Test
public void validRangeWithMultipleWhereExpiredEntitlementOverlaps() {
Consumer c = mockConsumer(PRODUCT_1);
Calendar cal = Calendar.getInstance();
Date now = cal.getTime();
DateRange range1 = rangeRelativeToDate(now, -4, 2);
DateRange range2 = rangeRelativeToDate(now, -7, -3);
c.addEntitlement(mockEntitlement(c, PRODUCT_1, range2, PRODUCT_1));
c.addEntitlement(mockEntitlement(c, PRODUCT_1, range1, PRODUCT_1));
List<Entitlement> ents = new LinkedList<Entitlement>(c.getEntitlements());
mockEntCurator(c, ents);
ComplianceStatus status = compliance.getStatus(c, now);
ConsumerInstalledProductEnricher calculator =
new ConsumerInstalledProductEnricher(c, status, compliance);