testing factory instead of service