@Test public void exceptionThrownWhenEssentialParamsMissing() { thrown.expect(EssentialParamMissingException.class); thrown.expectMessage("disbursedDate nextPaymentDate"); CreditRepaymentInfoRaw raw = CreditDataTestUtils.creditRepaymentInfoRawTestBuilder() .disbursedDate(null) .nextPaymentDate(null) .build(); CreditRepaymentInfoMapper.processRaw(raw); }
@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(); }
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(); } }
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(); }  }
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(); }   }
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(); }    }