implement ObjectSerializationCodecFactory and test & sample