@Test
void mapExtractionShouldPreserveIterationOrder()
{

    // GIVEN
    List<String> keys = Arrays.asList( "k2", "k1" );
    InternalRecord record =  new InternalRecord( keys, new Value[]{value( 0 ), value( 1 )} );
    Function<Value,Integer> addOne = value -> value.asInt() + 1;
    // WHEN
    Map<String,Integer> map = Extract.map( record, addOne );
    // THEN
    assertThat( map.keySet(), contains( "k2", "k1" )  );
    Iterator<Integer> values = map.values().iterator();
    assertThat( values.next(), equalTo( 1 ) );
    assertThat( values.next(), equalTo( 2 ) );
}