code: function (ws, message) {
    let clientMessage;
  
    try {
      clientMessage = JSON.parse(message);
      /* jshint ignore:start */
      if (_.get(clientMessage, 'type') === 'message') {
        ws.send(JSON.stringify({
          ok: true,
          reply_to: _.get(clientMessage, 'id'),
          ts: Date.now(),
          message: _.get(clientMessage, 'text', message),
          type: _.get(clientMessage, 'type', 'message'),
          user: _.get(clientMessage, 'user', 'U1234567'),
          channel: _.get(clientMessage, 'channel', 'C1234567'),
        }));
      }
      /* jshint ignore:end */
    } catch (err) {
      logger.info('Invalid socket data ', message);
    }
  }
docs: Function to handle incoming messages to the mock server.
  @param {object} ws web socket client instance.
  @param {object} message message send to the server.