default double getBalance(double principalAmount, double numberOfYears) throws DepositException {
    if(principalAmount < 0) throw new IllegalArgumentException("Invalid principalAmount: " + principalAmount);
    if(numberOfYears < 0) throw new DepositException("Invalid numberOfYears: " + numberOfYears);
    double j = getAnnualNominalInterestRate();
    double n = getCompoundingPeriodsPerYear();
    return principalAmount * Math.pow(1 + j / n, n * numberOfYears);
  }
A bank deposit with <a href="https://en.wikipedia.org/wiki/Compound_interest">compound interest</a>.
spock-specs/src/test/java/org/spockframework/smoke/mock/IDeposit.java