(Merge 3.2) Issue #12057: Add tests for the HZ encoding