Optimized Testing of Encoding and Decoding Functions: Automated Generation of Test Cases