DateValueConverter extends AbstractValueConverter<OffsetDateTime> { @Override public Value convertType(OffsetDateTime type, Thing thing) throws ValueConversionException { try { return getValueFactory(thing).createLiteral(type); } catch (Exception e) { throw new ValueConversionException("Issue converting calendar into Value", e); } } DateValueConverter(); @Override OffsetDateTime convertValue(final Value value, final Thing thing,
            final Class<? extends OffsetDateTime> desiredType); @Override Value convertType(OffsetDateTime type, Thing thing);  }
@Test public void convertTypeReturnsCorrectStringValue() { OffsetDateTime expected = OffsetDateTime.now(); Value value = valueConverter.convertType(expected, null); OffsetDateTime actual = OffsetDateTime.parse(value.stringValue()); assertEquals(expected, actual); }
@Test public void convertTypeReturnsCorrectDatatype() { OffsetDateTime expected = OffsetDateTime.now(); Value value = valueConverter.convertType(expected, null); assertEquals(((Literal) value).getDatatype(), vf.createIRI("http: }