@Test
void equality() {

    final LoanImpl l = new MockLoanBuilder()
        .set(LoanImpl::setInsuranceActive, true)
        .set(LoanImpl::setAmount, Money.from(100_000))
        .set(LoanImpl::setRating, Rating.D)
        .set(LoanImpl::setInterestRate, Ratio.ONE)
        .set(LoanImpl::setMainIncomeType, MainIncomeType.EMPLOYMENT)
        .set(LoanImpl::setPurpose, Purpose.AUTO_MOTO)
        .set(LoanImpl::setRegion, Region.JIHOCESKY)
        .set(LoanImpl::setStory, UUID.randomUUID()
            .toString())
        .set(LoanImpl::setTermInMonths, 20)
        .build();
    final LoanDescriptor original = new LoanDescriptor(l);
    final Wrapper<LoanDescriptor> w = Wrapper.wrap(original, FOLIO);
    assertSoftly(softly -> {
        softly.assertThat(w)
            .isEqualTo(w);
        softly.assertThat(w)
            .isEqualTo(Wrapper.wrap(original, FOLIO));
        softly.assertThat(w)
            .isEqualTo(Wrapper.wrap(new LoanDescriptor(l), FOLIO));
        softly.assertThat(w)
            .isNotEqualTo(Wrapper.wrap(new LoanDescriptor(MockLoanBuilder.fresh()), FOLIO));
        softly.assertThat(w)
            .isNotEqualTo(null);
    });
}