assertEquals(s.getProduct().getName(), update.getPool().getProductName());
}
@Test
public void datesNameChanged() {
Subscription s = TestUtil.createSubscription(owner, TestUtil.createProduct());
// Setup a pool with a single (different) provided product:
Pool p = TestUtil.copyFromSub(s);
p.setEndDate(new Date());
List<Pool> existingPools = Arrays.asList(p);
List<PoolUpdate> updates = this.poolRules.updatePools(s, existingPools);
assertEquals(1, updates.size());
PoolUpdate update = updates.get(0);
assertFalse(update.getProductsChanged());
assertTrue(update.getDatesChanged());
assertFalse(update.getQuantityChanged());
assertEquals(s.getEndDate(), update.getPool().getEndDate());
}