stub gateway and gateway tests