@Test public void test_should_return_null_when_first_date_parameter_is_null() { final DateDifferenceInDays dateDifferenceInDays = new DateDifferenceInDays(); final LocalDate now = LocalDate.now(); final Integer actualDays = dateDifferenceInDays.apply(null, now.minusDays(2)); assertNull(actualDays); }
@Override public Integer apply(LocalDate earlierDate, LocalDate laterDate) { if (earlierDate == null || laterDate == null) { return null; } return Days.daysBetween(earlierDate, laterDate).getDays(); }
DateDifferenceInDays implements BiFunction<LocalDate, LocalDate, Integer> { @Override public Integer apply(LocalDate earlierDate, LocalDate laterDate) { if (earlierDate == null || laterDate == null) { return null; } return Days.daysBetween(earlierDate, laterDate).getDays(); } }
DateDifferenceInDays implements BiFunction<LocalDate, LocalDate, Integer> { @Override public Integer apply(LocalDate earlierDate, LocalDate laterDate) { if (earlierDate == null || laterDate == null) { return null; } return Days.daysBetween(earlierDate, laterDate).getDays(); }  }
DateDifferenceInDays implements BiFunction<LocalDate, LocalDate, Integer> { @Override public Integer apply(LocalDate earlierDate, LocalDate laterDate) { if (earlierDate == null || laterDate == null) { return null; } return Days.daysBetween(earlierDate, laterDate).getDays(); }  @Override Integer apply(LocalDate earlierDate, LocalDate laterDate); }
DateDifferenceInDays implements BiFunction<LocalDate, LocalDate, Integer> { @Override public Integer apply(LocalDate earlierDate, LocalDate laterDate) { if (earlierDate == null || laterDate == null) { return null; } return Days.daysBetween(earlierDate, laterDate).getDays(); }  @Override Integer apply(LocalDate earlierDate, LocalDate laterDate); static final String NAME; }