RecommendedLoan implements Recommended<RecommendedLoan, LoanDescriptor, Loan> { @Override public String toString() { return "Recommendation{" + "loanDescriptor=" + loanDescriptor + ", recommendedInvestmentAmount=" + recommendedInvestment + '}'; } RecommendedLoan(final LoanDescriptor loanDescriptor, final Money amount); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override LoanDescriptor descriptor(); @Override Money amount();  }
@Test void notEqualsDifferentJavaType() { final RecommendedLoan r1 = new RecommendedLoan(RecommendedLoanTest.mockLoanDescriptor(), Money.from(200)); assertThat(r1).isNotEqualTo(r1.toString()); }