github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/common/msgprocessor/mocks/config_resources.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package mocks
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/hyperledger/fabric/common/channelconfig"
     8  	"github.com/hyperledger/fabric/common/configtx"
     9  	"github.com/hyperledger/fabric/common/policies"
    10  	"github.com/hyperledger/fabric/msp"
    11  )
    12  
    13  type Resources struct {
    14  	ApplicationConfigStub        func() (channelconfig.Application, bool)
    15  	applicationConfigMutex       sync.RWMutex
    16  	applicationConfigArgsForCall []struct {
    17  	}
    18  	applicationConfigReturns struct {
    19  		result1 channelconfig.Application
    20  		result2 bool
    21  	}
    22  	applicationConfigReturnsOnCall map[int]struct {
    23  		result1 channelconfig.Application
    24  		result2 bool
    25  	}
    26  	ChannelConfigStub        func() channelconfig.Channel
    27  	channelConfigMutex       sync.RWMutex
    28  	channelConfigArgsForCall []struct {
    29  	}
    30  	channelConfigReturns struct {
    31  		result1 channelconfig.Channel
    32  	}
    33  	channelConfigReturnsOnCall map[int]struct {
    34  		result1 channelconfig.Channel
    35  	}
    36  	ConfigtxValidatorStub        func() configtx.Validator
    37  	configtxValidatorMutex       sync.RWMutex
    38  	configtxValidatorArgsForCall []struct {
    39  	}
    40  	configtxValidatorReturns struct {
    41  		result1 configtx.Validator
    42  	}
    43  	configtxValidatorReturnsOnCall map[int]struct {
    44  		result1 configtx.Validator
    45  	}
    46  	ConsortiumsConfigStub        func() (channelconfig.Consortiums, bool)
    47  	consortiumsConfigMutex       sync.RWMutex
    48  	consortiumsConfigArgsForCall []struct {
    49  	}
    50  	consortiumsConfigReturns struct {
    51  		result1 channelconfig.Consortiums
    52  		result2 bool
    53  	}
    54  	consortiumsConfigReturnsOnCall map[int]struct {
    55  		result1 channelconfig.Consortiums
    56  		result2 bool
    57  	}
    58  	MSPManagerStub        func() msp.MSPManager
    59  	mSPManagerMutex       sync.RWMutex
    60  	mSPManagerArgsForCall []struct {
    61  	}
    62  	mSPManagerReturns struct {
    63  		result1 msp.MSPManager
    64  	}
    65  	mSPManagerReturnsOnCall map[int]struct {
    66  		result1 msp.MSPManager
    67  	}
    68  	OrdererConfigStub        func() (channelconfig.Orderer, bool)
    69  	ordererConfigMutex       sync.RWMutex
    70  	ordererConfigArgsForCall []struct {
    71  	}
    72  	ordererConfigReturns struct {
    73  		result1 channelconfig.Orderer
    74  		result2 bool
    75  	}
    76  	ordererConfigReturnsOnCall map[int]struct {
    77  		result1 channelconfig.Orderer
    78  		result2 bool
    79  	}
    80  	PolicyManagerStub        func() policies.Manager
    81  	policyManagerMutex       sync.RWMutex
    82  	policyManagerArgsForCall []struct {
    83  	}
    84  	policyManagerReturns struct {
    85  		result1 policies.Manager
    86  	}
    87  	policyManagerReturnsOnCall map[int]struct {
    88  		result1 policies.Manager
    89  	}
    90  	ValidateNewStub        func(channelconfig.Resources) error
    91  	validateNewMutex       sync.RWMutex
    92  	validateNewArgsForCall []struct {
    93  		arg1 channelconfig.Resources
    94  	}
    95  	validateNewReturns struct {
    96  		result1 error
    97  	}
    98  	validateNewReturnsOnCall map[int]struct {
    99  		result1 error
   100  	}
   101  	invocations      map[string][][]interface{}
   102  	invocationsMutex sync.RWMutex
   103  }
   104  
   105  func (fake *Resources) ApplicationConfig() (channelconfig.Application, bool) {
   106  	fake.applicationConfigMutex.Lock()
   107  	ret, specificReturn := fake.applicationConfigReturnsOnCall[len(fake.applicationConfigArgsForCall)]
   108  	fake.applicationConfigArgsForCall = append(fake.applicationConfigArgsForCall, struct {
   109  	}{})
   110  	fake.recordInvocation("ApplicationConfig", []interface{}{})
   111  	fake.applicationConfigMutex.Unlock()
   112  	if fake.ApplicationConfigStub != nil {
   113  		return fake.ApplicationConfigStub()
   114  	}
   115  	if specificReturn {
   116  		return ret.result1, ret.result2
   117  	}
   118  	fakeReturns := fake.applicationConfigReturns
   119  	return fakeReturns.result1, fakeReturns.result2
   120  }
   121  
   122  func (fake *Resources) ApplicationConfigCallCount() int {
   123  	fake.applicationConfigMutex.RLock()
   124  	defer fake.applicationConfigMutex.RUnlock()
   125  	return len(fake.applicationConfigArgsForCall)
   126  }
   127  
   128  func (fake *Resources) ApplicationConfigCalls(stub func() (channelconfig.Application, bool)) {
   129  	fake.applicationConfigMutex.Lock()
   130  	defer fake.applicationConfigMutex.Unlock()
   131  	fake.ApplicationConfigStub = stub
   132  }
   133  
   134  func (fake *Resources) ApplicationConfigReturns(result1 channelconfig.Application, result2 bool) {
   135  	fake.applicationConfigMutex.Lock()
   136  	defer fake.applicationConfigMutex.Unlock()
   137  	fake.ApplicationConfigStub = nil
   138  	fake.applicationConfigReturns = struct {
   139  		result1 channelconfig.Application
   140  		result2 bool
   141  	}{result1, result2}
   142  }
   143  
   144  func (fake *Resources) ApplicationConfigReturnsOnCall(i int, result1 channelconfig.Application, result2 bool) {
   145  	fake.applicationConfigMutex.Lock()
   146  	defer fake.applicationConfigMutex.Unlock()
   147  	fake.ApplicationConfigStub = nil
   148  	if fake.applicationConfigReturnsOnCall == nil {
   149  		fake.applicationConfigReturnsOnCall = make(map[int]struct {
   150  			result1 channelconfig.Application
   151  			result2 bool
   152  		})
   153  	}
   154  	fake.applicationConfigReturnsOnCall[i] = struct {
   155  		result1 channelconfig.Application
   156  		result2 bool
   157  	}{result1, result2}
   158  }
   159  
   160  func (fake *Resources) ChannelConfig() channelconfig.Channel {
   161  	fake.channelConfigMutex.Lock()
   162  	ret, specificReturn := fake.channelConfigReturnsOnCall[len(fake.channelConfigArgsForCall)]
   163  	fake.channelConfigArgsForCall = append(fake.channelConfigArgsForCall, struct {
   164  	}{})
   165  	fake.recordInvocation("ChannelConfig", []interface{}{})
   166  	fake.channelConfigMutex.Unlock()
   167  	if fake.ChannelConfigStub != nil {
   168  		return fake.ChannelConfigStub()
   169  	}
   170  	if specificReturn {
   171  		return ret.result1
   172  	}
   173  	fakeReturns := fake.channelConfigReturns
   174  	return fakeReturns.result1
   175  }
   176  
   177  func (fake *Resources) ChannelConfigCallCount() int {
   178  	fake.channelConfigMutex.RLock()
   179  	defer fake.channelConfigMutex.RUnlock()
   180  	return len(fake.channelConfigArgsForCall)
   181  }
   182  
   183  func (fake *Resources) ChannelConfigCalls(stub func() channelconfig.Channel) {
   184  	fake.channelConfigMutex.Lock()
   185  	defer fake.channelConfigMutex.Unlock()
   186  	fake.ChannelConfigStub = stub
   187  }
   188  
   189  func (fake *Resources) ChannelConfigReturns(result1 channelconfig.Channel) {
   190  	fake.channelConfigMutex.Lock()
   191  	defer fake.channelConfigMutex.Unlock()
   192  	fake.ChannelConfigStub = nil
   193  	fake.channelConfigReturns = struct {
   194  		result1 channelconfig.Channel
   195  	}{result1}
   196  }
   197  
   198  func (fake *Resources) ChannelConfigReturnsOnCall(i int, result1 channelconfig.Channel) {
   199  	fake.channelConfigMutex.Lock()
   200  	defer fake.channelConfigMutex.Unlock()
   201  	fake.ChannelConfigStub = nil
   202  	if fake.channelConfigReturnsOnCall == nil {
   203  		fake.channelConfigReturnsOnCall = make(map[int]struct {
   204  			result1 channelconfig.Channel
   205  		})
   206  	}
   207  	fake.channelConfigReturnsOnCall[i] = struct {
   208  		result1 channelconfig.Channel
   209  	}{result1}
   210  }
   211  
   212  func (fake *Resources) ConfigtxValidator() configtx.Validator {
   213  	fake.configtxValidatorMutex.Lock()
   214  	ret, specificReturn := fake.configtxValidatorReturnsOnCall[len(fake.configtxValidatorArgsForCall)]
   215  	fake.configtxValidatorArgsForCall = append(fake.configtxValidatorArgsForCall, struct {
   216  	}{})
   217  	fake.recordInvocation("ConfigtxValidator", []interface{}{})
   218  	fake.configtxValidatorMutex.Unlock()
   219  	if fake.ConfigtxValidatorStub != nil {
   220  		return fake.ConfigtxValidatorStub()
   221  	}
   222  	if specificReturn {
   223  		return ret.result1
   224  	}
   225  	fakeReturns := fake.configtxValidatorReturns
   226  	return fakeReturns.result1
   227  }
   228  
   229  func (fake *Resources) ConfigtxValidatorCallCount() int {
   230  	fake.configtxValidatorMutex.RLock()
   231  	defer fake.configtxValidatorMutex.RUnlock()
   232  	return len(fake.configtxValidatorArgsForCall)
   233  }
   234  
   235  func (fake *Resources) ConfigtxValidatorCalls(stub func() configtx.Validator) {
   236  	fake.configtxValidatorMutex.Lock()
   237  	defer fake.configtxValidatorMutex.Unlock()
   238  	fake.ConfigtxValidatorStub = stub
   239  }
   240  
   241  func (fake *Resources) ConfigtxValidatorReturns(result1 configtx.Validator) {
   242  	fake.configtxValidatorMutex.Lock()
   243  	defer fake.configtxValidatorMutex.Unlock()
   244  	fake.ConfigtxValidatorStub = nil
   245  	fake.configtxValidatorReturns = struct {
   246  		result1 configtx.Validator
   247  	}{result1}
   248  }
   249  
   250  func (fake *Resources) ConfigtxValidatorReturnsOnCall(i int, result1 configtx.Validator) {
   251  	fake.configtxValidatorMutex.Lock()
   252  	defer fake.configtxValidatorMutex.Unlock()
   253  	fake.ConfigtxValidatorStub = nil
   254  	if fake.configtxValidatorReturnsOnCall == nil {
   255  		fake.configtxValidatorReturnsOnCall = make(map[int]struct {
   256  			result1 configtx.Validator
   257  		})
   258  	}
   259  	fake.configtxValidatorReturnsOnCall[i] = struct {
   260  		result1 configtx.Validator
   261  	}{result1}
   262  }
   263  
   264  func (fake *Resources) ConsortiumsConfig() (channelconfig.Consortiums, bool) {
   265  	fake.consortiumsConfigMutex.Lock()
   266  	ret, specificReturn := fake.consortiumsConfigReturnsOnCall[len(fake.consortiumsConfigArgsForCall)]
   267  	fake.consortiumsConfigArgsForCall = append(fake.consortiumsConfigArgsForCall, struct {
   268  	}{})
   269  	fake.recordInvocation("ConsortiumsConfig", []interface{}{})
   270  	fake.consortiumsConfigMutex.Unlock()
   271  	if fake.ConsortiumsConfigStub != nil {
   272  		return fake.ConsortiumsConfigStub()
   273  	}
   274  	if specificReturn {
   275  		return ret.result1, ret.result2
   276  	}
   277  	fakeReturns := fake.consortiumsConfigReturns
   278  	return fakeReturns.result1, fakeReturns.result2
   279  }
   280  
   281  func (fake *Resources) ConsortiumsConfigCallCount() int {
   282  	fake.consortiumsConfigMutex.RLock()
   283  	defer fake.consortiumsConfigMutex.RUnlock()
   284  	return len(fake.consortiumsConfigArgsForCall)
   285  }
   286  
   287  func (fake *Resources) ConsortiumsConfigCalls(stub func() (channelconfig.Consortiums, bool)) {
   288  	fake.consortiumsConfigMutex.Lock()
   289  	defer fake.consortiumsConfigMutex.Unlock()
   290  	fake.ConsortiumsConfigStub = stub
   291  }
   292  
   293  func (fake *Resources) ConsortiumsConfigReturns(result1 channelconfig.Consortiums, result2 bool) {
   294  	fake.consortiumsConfigMutex.Lock()
   295  	defer fake.consortiumsConfigMutex.Unlock()
   296  	fake.ConsortiumsConfigStub = nil
   297  	fake.consortiumsConfigReturns = struct {
   298  		result1 channelconfig.Consortiums
   299  		result2 bool
   300  	}{result1, result2}
   301  }
   302  
   303  func (fake *Resources) ConsortiumsConfigReturnsOnCall(i int, result1 channelconfig.Consortiums, result2 bool) {
   304  	fake.consortiumsConfigMutex.Lock()
   305  	defer fake.consortiumsConfigMutex.Unlock()
   306  	fake.ConsortiumsConfigStub = nil
   307  	if fake.consortiumsConfigReturnsOnCall == nil {
   308  		fake.consortiumsConfigReturnsOnCall = make(map[int]struct {
   309  			result1 channelconfig.Consortiums
   310  			result2 bool
   311  		})
   312  	}
   313  	fake.consortiumsConfigReturnsOnCall[i] = struct {
   314  		result1 channelconfig.Consortiums
   315  		result2 bool
   316  	}{result1, result2}
   317  }
   318  
   319  func (fake *Resources) MSPManager() msp.MSPManager {
   320  	fake.mSPManagerMutex.Lock()
   321  	ret, specificReturn := fake.mSPManagerReturnsOnCall[len(fake.mSPManagerArgsForCall)]
   322  	fake.mSPManagerArgsForCall = append(fake.mSPManagerArgsForCall, struct {
   323  	}{})
   324  	fake.recordInvocation("MSPManager", []interface{}{})
   325  	fake.mSPManagerMutex.Unlock()
   326  	if fake.MSPManagerStub != nil {
   327  		return fake.MSPManagerStub()
   328  	}
   329  	if specificReturn {
   330  		return ret.result1
   331  	}
   332  	fakeReturns := fake.mSPManagerReturns
   333  	return fakeReturns.result1
   334  }
   335  
   336  func (fake *Resources) MSPManagerCallCount() int {
   337  	fake.mSPManagerMutex.RLock()
   338  	defer fake.mSPManagerMutex.RUnlock()
   339  	return len(fake.mSPManagerArgsForCall)
   340  }
   341  
   342  func (fake *Resources) MSPManagerCalls(stub func() msp.MSPManager) {
   343  	fake.mSPManagerMutex.Lock()
   344  	defer fake.mSPManagerMutex.Unlock()
   345  	fake.MSPManagerStub = stub
   346  }
   347  
   348  func (fake *Resources) MSPManagerReturns(result1 msp.MSPManager) {
   349  	fake.mSPManagerMutex.Lock()
   350  	defer fake.mSPManagerMutex.Unlock()
   351  	fake.MSPManagerStub = nil
   352  	fake.mSPManagerReturns = struct {
   353  		result1 msp.MSPManager
   354  	}{result1}
   355  }
   356  
   357  func (fake *Resources) MSPManagerReturnsOnCall(i int, result1 msp.MSPManager) {
   358  	fake.mSPManagerMutex.Lock()
   359  	defer fake.mSPManagerMutex.Unlock()
   360  	fake.MSPManagerStub = nil
   361  	if fake.mSPManagerReturnsOnCall == nil {
   362  		fake.mSPManagerReturnsOnCall = make(map[int]struct {
   363  			result1 msp.MSPManager
   364  		})
   365  	}
   366  	fake.mSPManagerReturnsOnCall[i] = struct {
   367  		result1 msp.MSPManager
   368  	}{result1}
   369  }
   370  
   371  func (fake *Resources) OrdererConfig() (channelconfig.Orderer, bool) {
   372  	fake.ordererConfigMutex.Lock()
   373  	ret, specificReturn := fake.ordererConfigReturnsOnCall[len(fake.ordererConfigArgsForCall)]
   374  	fake.ordererConfigArgsForCall = append(fake.ordererConfigArgsForCall, struct {
   375  	}{})
   376  	fake.recordInvocation("OrdererConfig", []interface{}{})
   377  	fake.ordererConfigMutex.Unlock()
   378  	if fake.OrdererConfigStub != nil {
   379  		return fake.OrdererConfigStub()
   380  	}
   381  	if specificReturn {
   382  		return ret.result1, ret.result2
   383  	}
   384  	fakeReturns := fake.ordererConfigReturns
   385  	return fakeReturns.result1, fakeReturns.result2
   386  }
   387  
   388  func (fake *Resources) OrdererConfigCallCount() int {
   389  	fake.ordererConfigMutex.RLock()
   390  	defer fake.ordererConfigMutex.RUnlock()
   391  	return len(fake.ordererConfigArgsForCall)
   392  }
   393  
   394  func (fake *Resources) OrdererConfigCalls(stub func() (channelconfig.Orderer, bool)) {
   395  	fake.ordererConfigMutex.Lock()
   396  	defer fake.ordererConfigMutex.Unlock()
   397  	fake.OrdererConfigStub = stub
   398  }
   399  
   400  func (fake *Resources) OrdererConfigReturns(result1 channelconfig.Orderer, result2 bool) {
   401  	fake.ordererConfigMutex.Lock()
   402  	defer fake.ordererConfigMutex.Unlock()
   403  	fake.OrdererConfigStub = nil
   404  	fake.ordererConfigReturns = struct {
   405  		result1 channelconfig.Orderer
   406  		result2 bool
   407  	}{result1, result2}
   408  }
   409  
   410  func (fake *Resources) OrdererConfigReturnsOnCall(i int, result1 channelconfig.Orderer, result2 bool) {
   411  	fake.ordererConfigMutex.Lock()
   412  	defer fake.ordererConfigMutex.Unlock()
   413  	fake.OrdererConfigStub = nil
   414  	if fake.ordererConfigReturnsOnCall == nil {
   415  		fake.ordererConfigReturnsOnCall = make(map[int]struct {
   416  			result1 channelconfig.Orderer
   417  			result2 bool
   418  		})
   419  	}
   420  	fake.ordererConfigReturnsOnCall[i] = struct {
   421  		result1 channelconfig.Orderer
   422  		result2 bool
   423  	}{result1, result2}
   424  }
   425  
   426  func (fake *Resources) PolicyManager() policies.Manager {
   427  	fake.policyManagerMutex.Lock()
   428  	ret, specificReturn := fake.policyManagerReturnsOnCall[len(fake.policyManagerArgsForCall)]
   429  	fake.policyManagerArgsForCall = append(fake.policyManagerArgsForCall, struct {
   430  	}{})
   431  	fake.recordInvocation("PolicyManager", []interface{}{})
   432  	fake.policyManagerMutex.Unlock()
   433  	if fake.PolicyManagerStub != nil {
   434  		return fake.PolicyManagerStub()
   435  	}
   436  	if specificReturn {
   437  		return ret.result1
   438  	}
   439  	fakeReturns := fake.policyManagerReturns
   440  	return fakeReturns.result1
   441  }
   442  
   443  func (fake *Resources) PolicyManagerCallCount() int {
   444  	fake.policyManagerMutex.RLock()
   445  	defer fake.policyManagerMutex.RUnlock()
   446  	return len(fake.policyManagerArgsForCall)
   447  }
   448  
   449  func (fake *Resources) PolicyManagerCalls(stub func() policies.Manager) {
   450  	fake.policyManagerMutex.Lock()
   451  	defer fake.policyManagerMutex.Unlock()
   452  	fake.PolicyManagerStub = stub
   453  }
   454  
   455  func (fake *Resources) PolicyManagerReturns(result1 policies.Manager) {
   456  	fake.policyManagerMutex.Lock()
   457  	defer fake.policyManagerMutex.Unlock()
   458  	fake.PolicyManagerStub = nil
   459  	fake.policyManagerReturns = struct {
   460  		result1 policies.Manager
   461  	}{result1}
   462  }
   463  
   464  func (fake *Resources) PolicyManagerReturnsOnCall(i int, result1 policies.Manager) {
   465  	fake.policyManagerMutex.Lock()
   466  	defer fake.policyManagerMutex.Unlock()
   467  	fake.PolicyManagerStub = nil
   468  	if fake.policyManagerReturnsOnCall == nil {
   469  		fake.policyManagerReturnsOnCall = make(map[int]struct {
   470  			result1 policies.Manager
   471  		})
   472  	}
   473  	fake.policyManagerReturnsOnCall[i] = struct {
   474  		result1 policies.Manager
   475  	}{result1}
   476  }
   477  
   478  func (fake *Resources) ValidateNew(arg1 channelconfig.Resources) error {
   479  	fake.validateNewMutex.Lock()
   480  	ret, specificReturn := fake.validateNewReturnsOnCall[len(fake.validateNewArgsForCall)]
   481  	fake.validateNewArgsForCall = append(fake.validateNewArgsForCall, struct {
   482  		arg1 channelconfig.Resources
   483  	}{arg1})
   484  	fake.recordInvocation("ValidateNew", []interface{}{arg1})
   485  	fake.validateNewMutex.Unlock()
   486  	if fake.ValidateNewStub != nil {
   487  		return fake.ValidateNewStub(arg1)
   488  	}
   489  	if specificReturn {
   490  		return ret.result1
   491  	}
   492  	fakeReturns := fake.validateNewReturns
   493  	return fakeReturns.result1
   494  }
   495  
   496  func (fake *Resources) ValidateNewCallCount() int {
   497  	fake.validateNewMutex.RLock()
   498  	defer fake.validateNewMutex.RUnlock()
   499  	return len(fake.validateNewArgsForCall)
   500  }
   501  
   502  func (fake *Resources) ValidateNewCalls(stub func(channelconfig.Resources) error) {
   503  	fake.validateNewMutex.Lock()
   504  	defer fake.validateNewMutex.Unlock()
   505  	fake.ValidateNewStub = stub
   506  }
   507  
   508  func (fake *Resources) ValidateNewArgsForCall(i int) channelconfig.Resources {
   509  	fake.validateNewMutex.RLock()
   510  	defer fake.validateNewMutex.RUnlock()
   511  	argsForCall := fake.validateNewArgsForCall[i]
   512  	return argsForCall.arg1
   513  }
   514  
   515  func (fake *Resources) ValidateNewReturns(result1 error) {
   516  	fake.validateNewMutex.Lock()
   517  	defer fake.validateNewMutex.Unlock()
   518  	fake.ValidateNewStub = nil
   519  	fake.validateNewReturns = struct {
   520  		result1 error
   521  	}{result1}
   522  }
   523  
   524  func (fake *Resources) ValidateNewReturnsOnCall(i int, result1 error) {
   525  	fake.validateNewMutex.Lock()
   526  	defer fake.validateNewMutex.Unlock()
   527  	fake.ValidateNewStub = nil
   528  	if fake.validateNewReturnsOnCall == nil {
   529  		fake.validateNewReturnsOnCall = make(map[int]struct {
   530  			result1 error
   531  		})
   532  	}
   533  	fake.validateNewReturnsOnCall[i] = struct {
   534  		result1 error
   535  	}{result1}
   536  }
   537  
   538  func (fake *Resources) Invocations() map[string][][]interface{} {
   539  	fake.invocationsMutex.RLock()
   540  	defer fake.invocationsMutex.RUnlock()
   541  	fake.applicationConfigMutex.RLock()
   542  	defer fake.applicationConfigMutex.RUnlock()
   543  	fake.channelConfigMutex.RLock()
   544  	defer fake.channelConfigMutex.RUnlock()
   545  	fake.configtxValidatorMutex.RLock()
   546  	defer fake.configtxValidatorMutex.RUnlock()
   547  	fake.consortiumsConfigMutex.RLock()
   548  	defer fake.consortiumsConfigMutex.RUnlock()
   549  	fake.mSPManagerMutex.RLock()
   550  	defer fake.mSPManagerMutex.RUnlock()
   551  	fake.ordererConfigMutex.RLock()
   552  	defer fake.ordererConfigMutex.RUnlock()
   553  	fake.policyManagerMutex.RLock()
   554  	defer fake.policyManagerMutex.RUnlock()
   555  	fake.validateNewMutex.RLock()
   556  	defer fake.validateNewMutex.RUnlock()
   557  	copiedInvocations := map[string][][]interface{}{}
   558  	for key, value := range fake.invocations {
   559  		copiedInvocations[key] = value
   560  	}
   561  	return copiedInvocations
   562  }
   563  
   564  func (fake *Resources) recordInvocation(key string, args []interface{}) {
   565  	fake.invocationsMutex.Lock()
   566  	defer fake.invocationsMutex.Unlock()
   567  	if fake.invocations == nil {
   568  		fake.invocations = map[string][][]interface{}{}
   569  	}
   570  	if fake.invocations[key] == nil {
   571  		fake.invocations[key] = [][]interface{}{}
   572  	}
   573  	fake.invocations[key] = append(fake.invocations[key], args)
   574  }