assert payment.getLastPaid() != null;
}
@Test
public void testPayMultiple() {
PaymentProcessor processor = new PaymentProcessor();
Payment payment = createTestPayment(new BigDecimal("100"), Frequency.WEEKLY);
assert payment.getAccount().getBalance().equals(INITIAL_BALANCE);
processor.processPayment(payment);
assert payment.getAccount().getBalance().equals(new BigDecimal("900"));
assert payment.getActive();
assert payment.getLastPaid() != null;
Date firstPayment = payment.getLastPaid();
pause(); // just need to make sure we are some small time in the future
processor.processPayment(payment);
assert payment.getAccount().getBalance().equals(new BigDecimal("800"));
assert payment.getActive();
assert payment.getLastPaid().after(firstPayment);
}