it('calls the callback for each item in the ranges', function () {
      var rowRanges = [[0, 0], [2, 2]];
      var colRanges = [[0, 3]];

      var selectionResult = rangeBoundaryNavigator.mapOver2DArray(rowRanges, colRanges, processCell, rowCollector);

      expect(selectionResult).toEqual(['[0,1,2,3]', '[4,5,6,7]']);
    });
      it('uses the union of the ranges', function () {
        spyOn(rangeBoundaryNavigator, 'getUnion').and.callThrough();

        var selectionResult = rangeBoundaryNavigator.mapOver2DArray(rowRanges, colRanges, processCell, rowCollector);

        expect(rangeBoundaryNavigator.getUnion).toHaveBeenCalledWith(rowRanges);
        expect(rangeBoundaryNavigator.getUnion).toHaveBeenCalledWith(colRanges);
        expect(selectionResult).toEqual(['[0,1,2,3]', '[4,5,6,7]']);
      });