function testGo(state, tAdditional, options) {
  $state.go(state, options && options.params, options);
  $q.flush();
  var expectRedirect = options && options.redirect;
  if (!expectRedirect)
    expect($state.current.name).toBe(state);
  else
    expect($state.current.name).toBe(expectRedirect);

  var root = $state.$current.path[0].parent;
  var __inactives = root.parent;

  // If ct.ui.router.extras.sticky module is included, then root.parent holds the inactive states/views
  if (__inactives) {
    var __inactiveViews = _.keys(__inactives.locals);
    var extra = _.difference(__inactiveViews, tLog.views);
    var missing = _.difference(tLog.views, __inactiveViews);

    expect("Extra Views: " + extra).toEqual("Extra Views: " + []);
    expect("Missing Views: " + missing).toEqual("Missing Views: " + []);
  }

  if (tExpected && tAdditional) {
    // append all arrays in tAdditional to arrays in tExpected
    angular.forEach(tAdditional, function (value, key) {
      tExpected[key] = tExpected[key].concat(tAdditional[key]);
    });

    angular.forEach(_.without(_.keys(tLog), 'views'), function(key) {
      var left = key + ": " + angular.toJson(tLog[key]);
      var right = key + ": " + angular.toJson(tExpected[key]);
      expect(left).toBe(right);
    });
  }
}
This test function does the following:
- Go to a state `state`.
- Flush transition
- Expect the current state to be the target state, or the expected redirect state
- analyse the transition log and expect
  - The entered states to match tAdditional.entered
  - The exited states to match tAdditional.exited
  - The inactivated states to match tAdditional.inactivated
  - The reactivated states to match tAdditional.reactivated
- Expect the active+inactive states to match the active+inactive views

@param state: The target state
@param tAdditional: An object with the expected transitions
   {
     entered:      statename or [ statenamearray ],
     exited:       statename or [ statenamearray ],
     inactivated:  statename or [ statenamearray ],
     reactivated:  statename or [ statenamearray ]
   }
   note: statenamearray may be built using the pathFrom helper function
@param options: options which modify the expected transition behavior
   { redirect: redirectstatename }