addon/validation: Add tests for the (un)encode_binary() functions