[test] Adding custom stringify tsts
[fix] Prevent deoptimzation
[fix] Catch handshake encode errors