Fixes serialize and unserialize tests.
Corrects type of assertion used in tests.