@Test
void shouldReturnNativeTypesAsDefaultValue()
{

    Value value = NullValue.NULL;
    // string
    assertThat( value.asString( "string value" ), equalTo( "string value" ) );
    // primitives
    assertThat( value.asBoolean( false ), equalTo( false ) );
    assertThat( value.asBoolean( true ), equalTo( true ) );
    assertThat( value.asInt( 10 ), equalTo( 10 ) );
    assertThat( value.asLong( 100L ), equalTo( 100L ) );
    assertThat( value.asFloat( 10.4f ), equalTo( 10.4f ) );
    assertThat( value.asDouble( 10.10 ), equalTo( 10.10 ) );
    //array, list, map
    assertThat( value.asByteArray( new byte[]{1, 2} ), equalTo( new byte[]{1, 2} ) );
    assertThat( value.asList( emptyList() ), equalTo( emptyList() ) );
    assertThat( value.asList( ofValue(), emptyList() ), equalTo( emptyList() ) );
    assertThat( value.asMap( emptyMap() ), equalTo( emptyMap() ) );
    assertThat( value.asMap( ofValue(), emptyMap() ), equalTo( emptyMap() ) );
    // spatial, temporal
    assertAsWithDefaultValueReturnDefault( value::asPoint, point( 1234, 1, 2 ).asPoint() );
    assertAsWithDefaultValueReturnDefault( value::asLocalDate, LocalDate.now() );
    assertAsWithDefaultValueReturnDefault( value::asOffsetTime, OffsetTime.now() );
    assertAsWithDefaultValueReturnDefault( value::asLocalTime, LocalTime.now() );
    assertAsWithDefaultValueReturnDefault( value::asLocalDateTime, LocalDateTime.now() );
    assertAsWithDefaultValueReturnDefault( value::asOffsetDateTime, OffsetDateTime.now() );
    assertAsWithDefaultValueReturnDefault( value::asZonedDateTime, ZonedDateTime.now() );
    assertAsWithDefaultValueReturnDefault( value::asIsoDuration,
            isoDuration( 1, 2, 3, 4 ).asIsoDuration() );
}