Generate repayment schedule and test