code: function BatchResponseCB (data) {
      switch (data.status ) {
          case -1: console.log (" SMS -%d- Fail to Send SMS", data.smsid);
              break;
          case -2: console.log (" SMS -%d- Timeout waiting acknowledgement", data.smsid);
              break;
          case 1: console.log (" SMS -%d- Message Sent", data.smsid);
              break;
          case 2: console.log (" SMS -%d- Acknowledgement=[%s]", data.smsid, data.msg.ack);
              break;
          default:
      }
      // quit except if we wait for ack [leave some time to DB to close operation]
      if (data.status === 0) {
          console.log ('Last SMS from batch processed');
          setTimeout(process.exit, 1000);
      }
  }
docs: Minimal Unit Testing Method