test: Fix shared random unit test for big endian