github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/core/scc/lscc/mock/cc_package.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package mock
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/golang/protobuf/proto"
     8  	"github.com/hyperledger/fabric-protos-go/peer"
     9  	"github.com/hyperledger/fabric/core/common/ccprovider"
    10  )
    11  
    12  type CCPackage struct {
    13  	GetChaincodeDataStub        func() *ccprovider.ChaincodeData
    14  	getChaincodeDataMutex       sync.RWMutex
    15  	getChaincodeDataArgsForCall []struct {
    16  	}
    17  	getChaincodeDataReturns struct {
    18  		result1 *ccprovider.ChaincodeData
    19  	}
    20  	getChaincodeDataReturnsOnCall map[int]struct {
    21  		result1 *ccprovider.ChaincodeData
    22  	}
    23  	GetDepSpecStub        func() *peer.ChaincodeDeploymentSpec
    24  	getDepSpecMutex       sync.RWMutex
    25  	getDepSpecArgsForCall []struct {
    26  	}
    27  	getDepSpecReturns struct {
    28  		result1 *peer.ChaincodeDeploymentSpec
    29  	}
    30  	getDepSpecReturnsOnCall map[int]struct {
    31  		result1 *peer.ChaincodeDeploymentSpec
    32  	}
    33  	GetDepSpecBytesStub        func() []byte
    34  	getDepSpecBytesMutex       sync.RWMutex
    35  	getDepSpecBytesArgsForCall []struct {
    36  	}
    37  	getDepSpecBytesReturns struct {
    38  		result1 []byte
    39  	}
    40  	getDepSpecBytesReturnsOnCall map[int]struct {
    41  		result1 []byte
    42  	}
    43  	GetIdStub        func() []byte
    44  	getIdMutex       sync.RWMutex
    45  	getIdArgsForCall []struct {
    46  	}
    47  	getIdReturns struct {
    48  		result1 []byte
    49  	}
    50  	getIdReturnsOnCall map[int]struct {
    51  		result1 []byte
    52  	}
    53  	GetPackageObjectStub        func() proto.Message
    54  	getPackageObjectMutex       sync.RWMutex
    55  	getPackageObjectArgsForCall []struct {
    56  	}
    57  	getPackageObjectReturns struct {
    58  		result1 proto.Message
    59  	}
    60  	getPackageObjectReturnsOnCall map[int]struct {
    61  		result1 proto.Message
    62  	}
    63  	InitFromBufferStub        func([]byte) (*ccprovider.ChaincodeData, error)
    64  	initFromBufferMutex       sync.RWMutex
    65  	initFromBufferArgsForCall []struct {
    66  		arg1 []byte
    67  	}
    68  	initFromBufferReturns struct {
    69  		result1 *ccprovider.ChaincodeData
    70  		result2 error
    71  	}
    72  	initFromBufferReturnsOnCall map[int]struct {
    73  		result1 *ccprovider.ChaincodeData
    74  		result2 error
    75  	}
    76  	PutChaincodeToFSStub        func() error
    77  	putChaincodeToFSMutex       sync.RWMutex
    78  	putChaincodeToFSArgsForCall []struct {
    79  	}
    80  	putChaincodeToFSReturns struct {
    81  		result1 error
    82  	}
    83  	putChaincodeToFSReturnsOnCall map[int]struct {
    84  		result1 error
    85  	}
    86  	ValidateCCStub        func(*ccprovider.ChaincodeData) error
    87  	validateCCMutex       sync.RWMutex
    88  	validateCCArgsForCall []struct {
    89  		arg1 *ccprovider.ChaincodeData
    90  	}
    91  	validateCCReturns struct {
    92  		result1 error
    93  	}
    94  	validateCCReturnsOnCall map[int]struct {
    95  		result1 error
    96  	}
    97  	invocations      map[string][][]interface{}
    98  	invocationsMutex sync.RWMutex
    99  }
   100  
   101  func (fake *CCPackage) GetChaincodeData() *ccprovider.ChaincodeData {
   102  	fake.getChaincodeDataMutex.Lock()
   103  	ret, specificReturn := fake.getChaincodeDataReturnsOnCall[len(fake.getChaincodeDataArgsForCall)]
   104  	fake.getChaincodeDataArgsForCall = append(fake.getChaincodeDataArgsForCall, struct {
   105  	}{})
   106  	fake.recordInvocation("GetChaincodeData", []interface{}{})
   107  	fake.getChaincodeDataMutex.Unlock()
   108  	if fake.GetChaincodeDataStub != nil {
   109  		return fake.GetChaincodeDataStub()
   110  	}
   111  	if specificReturn {
   112  		return ret.result1
   113  	}
   114  	fakeReturns := fake.getChaincodeDataReturns
   115  	return fakeReturns.result1
   116  }
   117  
   118  func (fake *CCPackage) GetChaincodeDataCallCount() int {
   119  	fake.getChaincodeDataMutex.RLock()
   120  	defer fake.getChaincodeDataMutex.RUnlock()
   121  	return len(fake.getChaincodeDataArgsForCall)
   122  }
   123  
   124  func (fake *CCPackage) GetChaincodeDataCalls(stub func() *ccprovider.ChaincodeData) {
   125  	fake.getChaincodeDataMutex.Lock()
   126  	defer fake.getChaincodeDataMutex.Unlock()
   127  	fake.GetChaincodeDataStub = stub
   128  }
   129  
   130  func (fake *CCPackage) GetChaincodeDataReturns(result1 *ccprovider.ChaincodeData) {
   131  	fake.getChaincodeDataMutex.Lock()
   132  	defer fake.getChaincodeDataMutex.Unlock()
   133  	fake.GetChaincodeDataStub = nil
   134  	fake.getChaincodeDataReturns = struct {
   135  		result1 *ccprovider.ChaincodeData
   136  	}{result1}
   137  }
   138  
   139  func (fake *CCPackage) GetChaincodeDataReturnsOnCall(i int, result1 *ccprovider.ChaincodeData) {
   140  	fake.getChaincodeDataMutex.Lock()
   141  	defer fake.getChaincodeDataMutex.Unlock()
   142  	fake.GetChaincodeDataStub = nil
   143  	if fake.getChaincodeDataReturnsOnCall == nil {
   144  		fake.getChaincodeDataReturnsOnCall = make(map[int]struct {
   145  			result1 *ccprovider.ChaincodeData
   146  		})
   147  	}
   148  	fake.getChaincodeDataReturnsOnCall[i] = struct {
   149  		result1 *ccprovider.ChaincodeData
   150  	}{result1}
   151  }
   152  
   153  func (fake *CCPackage) GetDepSpec() *peer.ChaincodeDeploymentSpec {
   154  	fake.getDepSpecMutex.Lock()
   155  	ret, specificReturn := fake.getDepSpecReturnsOnCall[len(fake.getDepSpecArgsForCall)]
   156  	fake.getDepSpecArgsForCall = append(fake.getDepSpecArgsForCall, struct {
   157  	}{})
   158  	fake.recordInvocation("GetDepSpec", []interface{}{})
   159  	fake.getDepSpecMutex.Unlock()
   160  	if fake.GetDepSpecStub != nil {
   161  		return fake.GetDepSpecStub()
   162  	}
   163  	if specificReturn {
   164  		return ret.result1
   165  	}
   166  	fakeReturns := fake.getDepSpecReturns
   167  	return fakeReturns.result1
   168  }
   169  
   170  func (fake *CCPackage) GetDepSpecCallCount() int {
   171  	fake.getDepSpecMutex.RLock()
   172  	defer fake.getDepSpecMutex.RUnlock()
   173  	return len(fake.getDepSpecArgsForCall)
   174  }
   175  
   176  func (fake *CCPackage) GetDepSpecCalls(stub func() *peer.ChaincodeDeploymentSpec) {
   177  	fake.getDepSpecMutex.Lock()
   178  	defer fake.getDepSpecMutex.Unlock()
   179  	fake.GetDepSpecStub = stub
   180  }
   181  
   182  func (fake *CCPackage) GetDepSpecReturns(result1 *peer.ChaincodeDeploymentSpec) {
   183  	fake.getDepSpecMutex.Lock()
   184  	defer fake.getDepSpecMutex.Unlock()
   185  	fake.GetDepSpecStub = nil
   186  	fake.getDepSpecReturns = struct {
   187  		result1 *peer.ChaincodeDeploymentSpec
   188  	}{result1}
   189  }
   190  
   191  func (fake *CCPackage) GetDepSpecReturnsOnCall(i int, result1 *peer.ChaincodeDeploymentSpec) {
   192  	fake.getDepSpecMutex.Lock()
   193  	defer fake.getDepSpecMutex.Unlock()
   194  	fake.GetDepSpecStub = nil
   195  	if fake.getDepSpecReturnsOnCall == nil {
   196  		fake.getDepSpecReturnsOnCall = make(map[int]struct {
   197  			result1 *peer.ChaincodeDeploymentSpec
   198  		})
   199  	}
   200  	fake.getDepSpecReturnsOnCall[i] = struct {
   201  		result1 *peer.ChaincodeDeploymentSpec
   202  	}{result1}
   203  }
   204  
   205  func (fake *CCPackage) GetDepSpecBytes() []byte {
   206  	fake.getDepSpecBytesMutex.Lock()
   207  	ret, specificReturn := fake.getDepSpecBytesReturnsOnCall[len(fake.getDepSpecBytesArgsForCall)]
   208  	fake.getDepSpecBytesArgsForCall = append(fake.getDepSpecBytesArgsForCall, struct {
   209  	}{})
   210  	fake.recordInvocation("GetDepSpecBytes", []interface{}{})
   211  	fake.getDepSpecBytesMutex.Unlock()
   212  	if fake.GetDepSpecBytesStub != nil {
   213  		return fake.GetDepSpecBytesStub()
   214  	}
   215  	if specificReturn {
   216  		return ret.result1
   217  	}
   218  	fakeReturns := fake.getDepSpecBytesReturns
   219  	return fakeReturns.result1
   220  }
   221  
   222  func (fake *CCPackage) GetDepSpecBytesCallCount() int {
   223  	fake.getDepSpecBytesMutex.RLock()
   224  	defer fake.getDepSpecBytesMutex.RUnlock()
   225  	return len(fake.getDepSpecBytesArgsForCall)
   226  }
   227  
   228  func (fake *CCPackage) GetDepSpecBytesCalls(stub func() []byte) {
   229  	fake.getDepSpecBytesMutex.Lock()
   230  	defer fake.getDepSpecBytesMutex.Unlock()
   231  	fake.GetDepSpecBytesStub = stub
   232  }
   233  
   234  func (fake *CCPackage) GetDepSpecBytesReturns(result1 []byte) {
   235  	fake.getDepSpecBytesMutex.Lock()
   236  	defer fake.getDepSpecBytesMutex.Unlock()
   237  	fake.GetDepSpecBytesStub = nil
   238  	fake.getDepSpecBytesReturns = struct {
   239  		result1 []byte
   240  	}{result1}
   241  }
   242  
   243  func (fake *CCPackage) GetDepSpecBytesReturnsOnCall(i int, result1 []byte) {
   244  	fake.getDepSpecBytesMutex.Lock()
   245  	defer fake.getDepSpecBytesMutex.Unlock()
   246  	fake.GetDepSpecBytesStub = nil
   247  	if fake.getDepSpecBytesReturnsOnCall == nil {
   248  		fake.getDepSpecBytesReturnsOnCall = make(map[int]struct {
   249  			result1 []byte
   250  		})
   251  	}
   252  	fake.getDepSpecBytesReturnsOnCall[i] = struct {
   253  		result1 []byte
   254  	}{result1}
   255  }
   256  
   257  func (fake *CCPackage) GetId() []byte {
   258  	fake.getIdMutex.Lock()
   259  	ret, specificReturn := fake.getIdReturnsOnCall[len(fake.getIdArgsForCall)]
   260  	fake.getIdArgsForCall = append(fake.getIdArgsForCall, struct {
   261  	}{})
   262  	fake.recordInvocation("GetId", []interface{}{})
   263  	fake.getIdMutex.Unlock()
   264  	if fake.GetIdStub != nil {
   265  		return fake.GetIdStub()
   266  	}
   267  	if specificReturn {
   268  		return ret.result1
   269  	}
   270  	fakeReturns := fake.getIdReturns
   271  	return fakeReturns.result1
   272  }
   273  
   274  func (fake *CCPackage) GetIdCallCount() int {
   275  	fake.getIdMutex.RLock()
   276  	defer fake.getIdMutex.RUnlock()
   277  	return len(fake.getIdArgsForCall)
   278  }
   279  
   280  func (fake *CCPackage) GetIdCalls(stub func() []byte) {
   281  	fake.getIdMutex.Lock()
   282  	defer fake.getIdMutex.Unlock()
   283  	fake.GetIdStub = stub
   284  }
   285  
   286  func (fake *CCPackage) GetIdReturns(result1 []byte) {
   287  	fake.getIdMutex.Lock()
   288  	defer fake.getIdMutex.Unlock()
   289  	fake.GetIdStub = nil
   290  	fake.getIdReturns = struct {
   291  		result1 []byte
   292  	}{result1}
   293  }
   294  
   295  func (fake *CCPackage) GetIdReturnsOnCall(i int, result1 []byte) {
   296  	fake.getIdMutex.Lock()
   297  	defer fake.getIdMutex.Unlock()
   298  	fake.GetIdStub = nil
   299  	if fake.getIdReturnsOnCall == nil {
   300  		fake.getIdReturnsOnCall = make(map[int]struct {
   301  			result1 []byte
   302  		})
   303  	}
   304  	fake.getIdReturnsOnCall[i] = struct {
   305  		result1 []byte
   306  	}{result1}
   307  }
   308  
   309  func (fake *CCPackage) GetPackageObject() proto.Message {
   310  	fake.getPackageObjectMutex.Lock()
   311  	ret, specificReturn := fake.getPackageObjectReturnsOnCall[len(fake.getPackageObjectArgsForCall)]
   312  	fake.getPackageObjectArgsForCall = append(fake.getPackageObjectArgsForCall, struct {
   313  	}{})
   314  	fake.recordInvocation("GetPackageObject", []interface{}{})
   315  	fake.getPackageObjectMutex.Unlock()
   316  	if fake.GetPackageObjectStub != nil {
   317  		return fake.GetPackageObjectStub()
   318  	}
   319  	if specificReturn {
   320  		return ret.result1
   321  	}
   322  	fakeReturns := fake.getPackageObjectReturns
   323  	return fakeReturns.result1
   324  }
   325  
   326  func (fake *CCPackage) GetPackageObjectCallCount() int {
   327  	fake.getPackageObjectMutex.RLock()
   328  	defer fake.getPackageObjectMutex.RUnlock()
   329  	return len(fake.getPackageObjectArgsForCall)
   330  }
   331  
   332  func (fake *CCPackage) GetPackageObjectCalls(stub func() proto.Message) {
   333  	fake.getPackageObjectMutex.Lock()
   334  	defer fake.getPackageObjectMutex.Unlock()
   335  	fake.GetPackageObjectStub = stub
   336  }
   337  
   338  func (fake *CCPackage) GetPackageObjectReturns(result1 proto.Message) {
   339  	fake.getPackageObjectMutex.Lock()
   340  	defer fake.getPackageObjectMutex.Unlock()
   341  	fake.GetPackageObjectStub = nil
   342  	fake.getPackageObjectReturns = struct {
   343  		result1 proto.Message
   344  	}{result1}
   345  }
   346  
   347  func (fake *CCPackage) GetPackageObjectReturnsOnCall(i int, result1 proto.Message) {
   348  	fake.getPackageObjectMutex.Lock()
   349  	defer fake.getPackageObjectMutex.Unlock()
   350  	fake.GetPackageObjectStub = nil
   351  	if fake.getPackageObjectReturnsOnCall == nil {
   352  		fake.getPackageObjectReturnsOnCall = make(map[int]struct {
   353  			result1 proto.Message
   354  		})
   355  	}
   356  	fake.getPackageObjectReturnsOnCall[i] = struct {
   357  		result1 proto.Message
   358  	}{result1}
   359  }
   360  
   361  func (fake *CCPackage) InitFromBuffer(arg1 []byte) (*ccprovider.ChaincodeData, error) {
   362  	var arg1Copy []byte
   363  	if arg1 != nil {
   364  		arg1Copy = make([]byte, len(arg1))
   365  		copy(arg1Copy, arg1)
   366  	}
   367  	fake.initFromBufferMutex.Lock()
   368  	ret, specificReturn := fake.initFromBufferReturnsOnCall[len(fake.initFromBufferArgsForCall)]
   369  	fake.initFromBufferArgsForCall = append(fake.initFromBufferArgsForCall, struct {
   370  		arg1 []byte
   371  	}{arg1Copy})
   372  	fake.recordInvocation("InitFromBuffer", []interface{}{arg1Copy})
   373  	fake.initFromBufferMutex.Unlock()
   374  	if fake.InitFromBufferStub != nil {
   375  		return fake.InitFromBufferStub(arg1)
   376  	}
   377  	if specificReturn {
   378  		return ret.result1, ret.result2
   379  	}
   380  	fakeReturns := fake.initFromBufferReturns
   381  	return fakeReturns.result1, fakeReturns.result2
   382  }
   383  
   384  func (fake *CCPackage) InitFromBufferCallCount() int {
   385  	fake.initFromBufferMutex.RLock()
   386  	defer fake.initFromBufferMutex.RUnlock()
   387  	return len(fake.initFromBufferArgsForCall)
   388  }
   389  
   390  func (fake *CCPackage) InitFromBufferCalls(stub func([]byte) (*ccprovider.ChaincodeData, error)) {
   391  	fake.initFromBufferMutex.Lock()
   392  	defer fake.initFromBufferMutex.Unlock()
   393  	fake.InitFromBufferStub = stub
   394  }
   395  
   396  func (fake *CCPackage) InitFromBufferArgsForCall(i int) []byte {
   397  	fake.initFromBufferMutex.RLock()
   398  	defer fake.initFromBufferMutex.RUnlock()
   399  	argsForCall := fake.initFromBufferArgsForCall[i]
   400  	return argsForCall.arg1
   401  }
   402  
   403  func (fake *CCPackage) InitFromBufferReturns(result1 *ccprovider.ChaincodeData, result2 error) {
   404  	fake.initFromBufferMutex.Lock()
   405  	defer fake.initFromBufferMutex.Unlock()
   406  	fake.InitFromBufferStub = nil
   407  	fake.initFromBufferReturns = struct {
   408  		result1 *ccprovider.ChaincodeData
   409  		result2 error
   410  	}{result1, result2}
   411  }
   412  
   413  func (fake *CCPackage) InitFromBufferReturnsOnCall(i int, result1 *ccprovider.ChaincodeData, result2 error) {
   414  	fake.initFromBufferMutex.Lock()
   415  	defer fake.initFromBufferMutex.Unlock()
   416  	fake.InitFromBufferStub = nil
   417  	if fake.initFromBufferReturnsOnCall == nil {
   418  		fake.initFromBufferReturnsOnCall = make(map[int]struct {
   419  			result1 *ccprovider.ChaincodeData
   420  			result2 error
   421  		})
   422  	}
   423  	fake.initFromBufferReturnsOnCall[i] = struct {
   424  		result1 *ccprovider.ChaincodeData
   425  		result2 error
   426  	}{result1, result2}
   427  }
   428  
   429  func (fake *CCPackage) PutChaincodeToFS() error {
   430  	fake.putChaincodeToFSMutex.Lock()
   431  	ret, specificReturn := fake.putChaincodeToFSReturnsOnCall[len(fake.putChaincodeToFSArgsForCall)]
   432  	fake.putChaincodeToFSArgsForCall = append(fake.putChaincodeToFSArgsForCall, struct {
   433  	}{})
   434  	fake.recordInvocation("PutChaincodeToFS", []interface{}{})
   435  	fake.putChaincodeToFSMutex.Unlock()
   436  	if fake.PutChaincodeToFSStub != nil {
   437  		return fake.PutChaincodeToFSStub()
   438  	}
   439  	if specificReturn {
   440  		return ret.result1
   441  	}
   442  	fakeReturns := fake.putChaincodeToFSReturns
   443  	return fakeReturns.result1
   444  }
   445  
   446  func (fake *CCPackage) PutChaincodeToFSCallCount() int {
   447  	fake.putChaincodeToFSMutex.RLock()
   448  	defer fake.putChaincodeToFSMutex.RUnlock()
   449  	return len(fake.putChaincodeToFSArgsForCall)
   450  }
   451  
   452  func (fake *CCPackage) PutChaincodeToFSCalls(stub func() error) {
   453  	fake.putChaincodeToFSMutex.Lock()
   454  	defer fake.putChaincodeToFSMutex.Unlock()
   455  	fake.PutChaincodeToFSStub = stub
   456  }
   457  
   458  func (fake *CCPackage) PutChaincodeToFSReturns(result1 error) {
   459  	fake.putChaincodeToFSMutex.Lock()
   460  	defer fake.putChaincodeToFSMutex.Unlock()
   461  	fake.PutChaincodeToFSStub = nil
   462  	fake.putChaincodeToFSReturns = struct {
   463  		result1 error
   464  	}{result1}
   465  }
   466  
   467  func (fake *CCPackage) PutChaincodeToFSReturnsOnCall(i int, result1 error) {
   468  	fake.putChaincodeToFSMutex.Lock()
   469  	defer fake.putChaincodeToFSMutex.Unlock()
   470  	fake.PutChaincodeToFSStub = nil
   471  	if fake.putChaincodeToFSReturnsOnCall == nil {
   472  		fake.putChaincodeToFSReturnsOnCall = make(map[int]struct {
   473  			result1 error
   474  		})
   475  	}
   476  	fake.putChaincodeToFSReturnsOnCall[i] = struct {
   477  		result1 error
   478  	}{result1}
   479  }
   480  
   481  func (fake *CCPackage) ValidateCC(arg1 *ccprovider.ChaincodeData) error {
   482  	fake.validateCCMutex.Lock()
   483  	ret, specificReturn := fake.validateCCReturnsOnCall[len(fake.validateCCArgsForCall)]
   484  	fake.validateCCArgsForCall = append(fake.validateCCArgsForCall, struct {
   485  		arg1 *ccprovider.ChaincodeData
   486  	}{arg1})
   487  	fake.recordInvocation("ValidateCC", []interface{}{arg1})
   488  	fake.validateCCMutex.Unlock()
   489  	if fake.ValidateCCStub != nil {
   490  		return fake.ValidateCCStub(arg1)
   491  	}
   492  	if specificReturn {
   493  		return ret.result1
   494  	}
   495  	fakeReturns := fake.validateCCReturns
   496  	return fakeReturns.result1
   497  }
   498  
   499  func (fake *CCPackage) ValidateCCCallCount() int {
   500  	fake.validateCCMutex.RLock()
   501  	defer fake.validateCCMutex.RUnlock()
   502  	return len(fake.validateCCArgsForCall)
   503  }
   504  
   505  func (fake *CCPackage) ValidateCCCalls(stub func(*ccprovider.ChaincodeData) error) {
   506  	fake.validateCCMutex.Lock()
   507  	defer fake.validateCCMutex.Unlock()
   508  	fake.ValidateCCStub = stub
   509  }
   510  
   511  func (fake *CCPackage) ValidateCCArgsForCall(i int) *ccprovider.ChaincodeData {
   512  	fake.validateCCMutex.RLock()
   513  	defer fake.validateCCMutex.RUnlock()
   514  	argsForCall := fake.validateCCArgsForCall[i]
   515  	return argsForCall.arg1
   516  }
   517  
   518  func (fake *CCPackage) ValidateCCReturns(result1 error) {
   519  	fake.validateCCMutex.Lock()
   520  	defer fake.validateCCMutex.Unlock()
   521  	fake.ValidateCCStub = nil
   522  	fake.validateCCReturns = struct {
   523  		result1 error
   524  	}{result1}
   525  }
   526  
   527  func (fake *CCPackage) ValidateCCReturnsOnCall(i int, result1 error) {
   528  	fake.validateCCMutex.Lock()
   529  	defer fake.validateCCMutex.Unlock()
   530  	fake.ValidateCCStub = nil
   531  	if fake.validateCCReturnsOnCall == nil {
   532  		fake.validateCCReturnsOnCall = make(map[int]struct {
   533  			result1 error
   534  		})
   535  	}
   536  	fake.validateCCReturnsOnCall[i] = struct {
   537  		result1 error
   538  	}{result1}
   539  }
   540  
   541  func (fake *CCPackage) Invocations() map[string][][]interface{} {
   542  	fake.invocationsMutex.RLock()
   543  	defer fake.invocationsMutex.RUnlock()
   544  	fake.getChaincodeDataMutex.RLock()
   545  	defer fake.getChaincodeDataMutex.RUnlock()
   546  	fake.getDepSpecMutex.RLock()
   547  	defer fake.getDepSpecMutex.RUnlock()
   548  	fake.getDepSpecBytesMutex.RLock()
   549  	defer fake.getDepSpecBytesMutex.RUnlock()
   550  	fake.getIdMutex.RLock()
   551  	defer fake.getIdMutex.RUnlock()
   552  	fake.getPackageObjectMutex.RLock()
   553  	defer fake.getPackageObjectMutex.RUnlock()
   554  	fake.initFromBufferMutex.RLock()
   555  	defer fake.initFromBufferMutex.RUnlock()
   556  	fake.putChaincodeToFSMutex.RLock()
   557  	defer fake.putChaincodeToFSMutex.RUnlock()
   558  	fake.validateCCMutex.RLock()
   559  	defer fake.validateCCMutex.RUnlock()
   560  	copiedInvocations := map[string][][]interface{}{}
   561  	for key, value := range fake.invocations {
   562  		copiedInvocations[key] = value
   563  	}
   564  	return copiedInvocations
   565  }
   566  
   567  func (fake *CCPackage) recordInvocation(key string, args []interface{}) {
   568  	fake.invocationsMutex.Lock()
   569  	defer fake.invocationsMutex.Unlock()
   570  	if fake.invocations == nil {
   571  		fake.invocations = map[string][][]interface{}{}
   572  	}
   573  	if fake.invocations[key] == nil {
   574  		fake.invocations[key] = [][]interface{}{}
   575  	}
   576  	fake.invocations[key] = append(fake.invocations[key], args)
   577  }