Allows serializing service factories for rpc.
Added missing dependency in partner service factory test.