@Test public void getLocalDateTime() throws Exception { assertNotNull(TimeContext.getLocalDateTime()); final Instant now = Instant.now(); TimeContext.setTime(now); assertEquals("The calendar should be equal", now, TimeContext.getLocalDateTime().atZone(TimeContext.getZone()).toInstant()); assertNotSame("The time must be the same since LocalDateTime is immutable", TimeContext.getLocalDateTime(), TimeContext.getLocalDateTime()); TimeContext.clear(); }
public static LocalDateTime getLocalDateTime() { return LocalDateTime.ofInstant(getTime(), getZone()); }
TimeContext { public static LocalDateTime getLocalDateTime() { return LocalDateTime.ofInstant(getTime(), getZone()); } }
TimeContext { public static LocalDateTime getLocalDateTime() { return LocalDateTime.ofInstant(getTime(), getZone()); } private  TimeContext(); }
TimeContext { public static LocalDateTime getLocalDateTime() { return LocalDateTime.ofInstant(getTime(), getZone()); } private  TimeContext(); static ZoneId getZone(); static long getMillis(); static Instant getTime(); static LocalDate getLocalDate(); static LocalDateTime getLocalDateTime(); static ZonedDateTime getZonedDateTime(); static void setTime(final Instant time); static void setNow(); static void setZone(final ZoneId zoneId); static void clear(); static void destroy(); }
TimeContext { public static LocalDateTime getLocalDateTime() { return LocalDateTime.ofInstant(getTime(), getZone()); } private  TimeContext(); static ZoneId getZone(); static long getMillis(); static Instant getTime(); static LocalDate getLocalDate(); static LocalDateTime getLocalDateTime(); static ZonedDateTime getZonedDateTime(); static void setTime(final Instant time); static void setNow(); static void setZone(final ZoneId zoneId); static void clear(); static void destroy();  }