Add service factory tests