add encode_location test