@Test
void equals() {

    final BigDecimal remainingPrincipal = BigDecimal.TEN;
    final Investment i = mockInvestment(remainingPrincipal);
    final InvestmentDescriptor d = new InvestmentDescriptor(i, () -> LOAN);
    final RecommendedInvestment r = new RecommendedInvestment(d, Money.from(remainingPrincipal));
    assertSoftly(softly -> {
        softly.assertThat(r)
            .isNotEqualTo(null);
        softly.assertThat(r)
            .isNotEqualTo(UUID.randomUUID()
                .toString());
        softly.assertThat(r)
            .isEqualTo(r);
    });
    final RecommendedInvestment r2 = new RecommendedInvestment(d, Money.from(remainingPrincipal));
    assertSoftly(softly -> {
        softly.assertThat(r)
            .isEqualTo(r2);
        softly.assertThat(r2)
            .isEqualTo(r);
    });
    final RecommendedInvestment r3 = new RecommendedInvestment(
            new InvestmentDescriptor(mockInvestment(remainingPrincipal), () -> LOAN),
            Money.from(remainingPrincipal));
    assertThat(r).isNotEqualTo(r3);
}