Test fix for unpredictable test case in serialization