@Test public void testInstantTypeConversionWithDateInput(){ InstantTypeConversion instantTypeConversion = new InstantTypeConversion(); assertTrue(instantTypeConversion.convert(new Date()) instanceof Instant); }
@Override public Instant convert(Object value) { if (value == null) { return null; } else if (value instanceof Instant) { return (Instant)value; } else if (value instanceof Date) { return ((Date)value).toInstant(); } else if (value instanceof CharSequence) { return Instant.parse((CharSequence)value); } else { return Instant.parse(value.toString()); } }
InstantTypeConversion implements TypeConverter.Conversion<Instant> { @Override public Instant convert(Object value) { if (value == null) { return null; } else if (value instanceof Instant) { return (Instant)value; } else if (value instanceof Date) { return ((Date)value).toInstant(); } else if (value instanceof CharSequence) { return Instant.parse((CharSequence)value); } else { return Instant.parse(value.toString()); } } }
InstantTypeConversion implements TypeConverter.Conversion<Instant> { @Override public Instant convert(Object value) { if (value == null) { return null; } else if (value instanceof Instant) { return (Instant)value; } else if (value instanceof Date) { return ((Date)value).toInstant(); } else if (value instanceof CharSequence) { return Instant.parse((CharSequence)value); } else { return Instant.parse(value.toString()); } }  }
InstantTypeConversion implements TypeConverter.Conversion<Instant> { @Override public Instant convert(Object value) { if (value == null) { return null; } else if (value instanceof Instant) { return (Instant)value; } else if (value instanceof Date) { return ((Date)value).toInstant(); } else if (value instanceof CharSequence) { return Instant.parse((CharSequence)value); } else { return Instant.parse(value.toString()); } }  @Override Object[] getTypeKeys(); @Override Instant convert(Object value); }
InstantTypeConversion implements TypeConverter.Conversion<Instant> { @Override public Instant convert(Object value) { if (value == null) { return null; } else if (value instanceof Instant) { return (Instant)value; } else if (value instanceof Date) { return ((Date)value).toInstant(); } else if (value instanceof CharSequence) { return Instant.parse((CharSequence)value); } else { return Instant.parse(value.toString()); } }  @Override Object[] getTypeKeys(); @Override Instant convert(Object value);  }