FunctionReference (de)serialization tests.