text: /**
   * Created by marija on 22.02.18.
   */
  
  
  
  var p1 = Promise.resolve(18);
  var p2 = Promise.reject(17);
  
  
  
  
  
  
  
  
  var callbackArguments = [];
  var argument1 = function (results) {
   callbackArguments.push(arguments) 
  
      try {
          assertOccurrences(results, [
              {
                  start: 10,
                  end: 11
              },
              {
                  start: 22,
                  end: 23
              }
          ]);
      } finally {
          tearDown();
      }
  };
  var argument2 = -1;
  var argument3 = function (err) {
   callbackArguments.push(arguments) 
  
      destination.requireDestinationTag = false;
      destination.balance = 0;
      return destination;
  };
  var argument4 = null;
  var argument5 = function (err) {
   callbackArguments.push(arguments) 
  
      expect(err).to.exist;
      done();
  };
  var argument6 = function () {
   callbackArguments.push(arguments) 
  
      return driver.executeAsyncScript(function (events, callback) {
          var result = [];
          Reanimator.replay({
              dates: [],
              events: events
          });
          setInterval(function () {
              result.push(0);
          }, 100);
          setInterval(function () {
              result.push(1);
              if (result.length >= 5) {
                  Reanimator.cleanUp();
                  callback(result);
              }
          }, 30);
      }, events);
  };
  var argument7 = null;
  var argument8 = ["Ms","4S","{H","FRwQw","A",")","oyU"];
  var base_0 = p2
  var r_0= undefined
  try {
  r_0 = base_0.then(argument1,argument2)
  }
  catch(e) {
  r_0= e.message
  }
  var base_1 = p2
  var r_1= undefined
  try {
  r_1 = base_1.catch(argument3,argument4)
  }
  catch(e) {
  r_1= e.message
  }
  var base_2 = r_1
  var r_2= undefined
  try {
  r_2 = base_2.catch(argument5)
  }
  catch(e) {
  r_2= e.message
  }
  var base_3 = p2
  var r_3= undefined
  try {
  r_3 = base_3.then(argument6,argument7,argument8)
  }
  catch(e) {
  r_3= e.message
  }
  function serialize(array){
  return array.map(function(a){
  if (a === null || a == undefined) return a;
  var name = a.constructor.name;
  if (name==='Object' || name=='Boolean'|| name=='Array'||name=='Number'||name=='String')
  return JSON.stringify(a);
  return name;
   });
  }
  setTimeout(function(){
  require("fs").writeFileSync("./experiments/promises/promiseMined/test545.json",JSON.stringify({"baseObjects":serialize([base_0,base_1,base_2,base_3]),"returnObjects":serialize([r_0,r_1,r_2,r_3]),"callbackArgs":callbackArguments}))
  },300)