I currently have a constructor that has some functionality inside. I know this can't be good. It makes it impossible to test the expected output of the method inside here. How can I change this up?

```
public loan(BigDecimal amount, BigDecimal interestRate, BigDecimal years) {

    this.amount = amount.multiply(BigDecimal.valueOf(100));
    this.interest = interestRate;
    this.initialTermMonths = years.multiply(BigDecimal.valueOf(12));

    this.monthlyPaymentAmount = calculateMonthlyPayment();
}

```

There is no way for me to make a JUnit test to assert the calculateMonthlyPayment() method output. How can I change this into a factory method? Or is there another way?