@Test
public void fromFieldValue_dateTime() {

    BdioContext context = DEFAULT_CONTEXT;
    ZonedDateTime zoned = ZonedDateTime.now(ZoneId.systemDefault());
    assertThat(context.fromFieldValue("test", ImmutableMap.of("@type", Bdio.Datatype.DateTime.toString(), "@value", zoned.toString())))
            .named("zoned").isEqualTo(zoned);
    OffsetDateTime offset = OffsetDateTime.now(ZoneId.systemDefault());
    assertThat(context.fromFieldValue("test", ImmutableMap.of("@type", Bdio.Datatype.DateTime.toString(), "@value", offset.toString())))
            .named("offset").isEqualTo(offset.toZonedDateTime());
    Instant instant = Instant.now();
    assertThat(context.fromFieldValue("test", ImmutableMap.of("@type", Bdio.Datatype.DateTime.toString(), "@value", instant.toString())))
            .named("instant").isEqualTo(instant.atZone(ZoneOffset.UTC));
    Date date = new Date();
    assertThat(context.fromFieldValue("test", ImmutableMap.of("@type", Bdio.Datatype.DateTime.toString(), "@value", date)))
            .named("date").isEqualTo(date.toInstant().atZone(ZoneOffset.UTC));
}