Inject gateways with a custom gateway factory