LongToInstantConverter implements Converter<Long, Instant> { @Override public Instant convert(Long source) { if (source == null) { return null; } return Instant.ofEpochSecond(0, source); }  @Override Instant convert(Long source); static final LongToInstantConverter INSTANCE; }
@Test void convertNull() { Instant result = converter.convert(null); assertNull(result); }
@Test void convertLongMin() { Instant result = converter.convert(Long.MIN_VALUE); Instant.ofEpochSecond(-123, -456); assertEquals(Instant.parse("1677-09-21T00:12:43.145224192Z"), result); }
@Test void convertLongMax() { Instant result = converter.convert(Long.MAX_VALUE); assertEquals(Instant.parse("2262-04-11T23:47:16.854775807Z"), result); }