@Test
void identifyLoanBased() {

    final LoanBased l = new LoanDefaultedEvent() {
        @Override
        public OffsetDateTime getCreatedOn() {
            return OffsetDateTime.now();
        }
        @Override
        public Loan getLoan() {
            return new MockLoanBuilder()
                .set(LoanImpl::setRating, Rating.D)
                .set(LoanImpl::setInterestRate, Ratio.ONE)
                .build();
        }
        @Override
        public Investment getInvestment() {
            return null;
        }
        @Override
        public LocalDate getDelinquentSince() {
            return LocalDate.now();
        }
    };
    assertThat(Util.identifyLoan(l)).isNotEmpty();
}