final Money totalInterestRemaining = totalInterestDueForLoan.minus(totalCumulativeInterestToDate);
if (totalInterestRemaining.isLessThanZero()) {
// paid too much interest, subtract amount that overpays from
// interest paid for period.
adjusted = interestForThisPeriod.minus(totalInterestRemaining.abs());
} else if (isLastRepaymentPeriod(this.numberOfRepayments, periodNumber)) {
final Money interestDifference = totalCumulativeInterestToDate.minus(totalInterestDueForLoan);
if (interestDifference.isLessThanZero()) {
adjusted = interestForThisPeriod.plus(interestDifference.abs());
} else if (interestDifference.isGreaterThanZero()) {