@Test public void testGetEndDateTime(){ LocalDate localDate = LocalDate.of(1970, 01, 01); LocalDateTime expectDateTime = LocalDateTime.of(1970, 01, 01, 23, 59, 59,999999999); LocalDateTime resultDateTime = reportTypeConvert.getEndDateTime(localDate); Assert.assertEquals(expectDateTime, resultDateTime); }
@Override public LocalDateTime getEndDateTime(LocalDate localDate) { Assert.notNull(localDate, "localDate cannot be null"); LocalDateTime endOfDayTime = localDate.plusDays(1).atStartOfDay().minusNanos(1); LocalDateTime endDateTime = localDate.equals(LocalDate.now()) ? LocalDateTime.now() : endOfDayTime; return endDateTime; }
ReportTypeConvert implements ReportUtils { @Override public LocalDateTime getEndDateTime(LocalDate localDate) { Assert.notNull(localDate, "localDate cannot be null"); LocalDateTime endOfDayTime = localDate.plusDays(1).atStartOfDay().minusNanos(1); LocalDateTime endDateTime = localDate.equals(LocalDate.now()) ? LocalDateTime.now() : endOfDayTime; return endDateTime; } }
ReportTypeConvert implements ReportUtils { @Override public LocalDateTime getEndDateTime(LocalDate localDate) { Assert.notNull(localDate, "localDate cannot be null"); LocalDateTime endOfDayTime = localDate.plusDays(1).atStartOfDay().minusNanos(1); LocalDateTime endDateTime = localDate.equals(LocalDate.now()) ? LocalDateTime.now() : endOfDayTime; return endDateTime; }  }
ReportTypeConvert implements ReportUtils { @Override public LocalDateTime getEndDateTime(LocalDate localDate) { Assert.notNull(localDate, "localDate cannot be null"); LocalDateTime endOfDayTime = localDate.plusDays(1).atStartOfDay().minusNanos(1); LocalDateTime endDateTime = localDate.equals(LocalDate.now()) ? LocalDateTime.now() : endOfDayTime; return endDateTime; }  @Override LocalDateTime getStartDateTime(LocalDate localDate); @Override LocalDateTime getEndDateTime(LocalDate localDate); @Override long convertLocalDateTimeToEpoch(LocalDateTime localDateTime); }
ReportTypeConvert implements ReportUtils { @Override public LocalDateTime getEndDateTime(LocalDate localDate) { Assert.notNull(localDate, "localDate cannot be null"); LocalDateTime endOfDayTime = localDate.plusDays(1).atStartOfDay().minusNanos(1); LocalDateTime endDateTime = localDate.equals(LocalDate.now()) ? LocalDateTime.now() : endOfDayTime; return endDateTime; }  @Override LocalDateTime getStartDateTime(LocalDate localDate); @Override LocalDateTime getEndDateTime(LocalDate localDate); @Override long convertLocalDateTimeToEpoch(LocalDateTime localDateTime);  }