Added test for _decode_key_value.