### Question:
CreditRepaymentInfoMapper { @NonNull @SuppressWarnings("ConstantConditions") static CreditRepaymentInfo processRaw(@NonNull final CreditRepaymentInfoRaw raw) { assertEssentialParams(raw); return CreditRepaymentInfo.builder() .disbursedDate(raw.disbursedDate()) .nextPaymentDate(raw.nextPaymentDate()) .nextPayment(raw.nextPayment()) .totalPaid(raw.totalPaid()) .build(); }    }### Answer:
@Test public void map() { CreditRepaymentInfoRaw raw = CreditDataTestUtils.creditRepaymentInfoRawTestBuilder().build(); CreditRepaymentInfo mapped = CreditRepaymentInfoMapper.processRaw(raw); assertThat(mapped.disbursedDate()).isEqualTo(raw.disbursedDate()); assertThat(mapped.nextPaymentDate()).isEqualTo(raw.nextPaymentDate()); assertThat(mapped.nextPayment()).isEqualTo(raw.nextPayment()); assertThat(mapped.totalPaid()).isEqualTo(raw.totalPaid()); }
@Test public void exceptionThrownWhenEssentialParamsMissing() { thrown.expect(EssentialParamMissingException.class); thrown.expectMessage("disbursedDate nextPaymentDate"); CreditRepaymentInfoRaw raw = CreditDataTestUtils.creditRepaymentInfoRawTestBuilder() .disbursedDate(null) .nextPaymentDate(null) .build(); CreditRepaymentInfoMapper.processRaw(raw); }