title: Hyperledger Fabric unit test cross-chaincode invocation without collapsing vendor folder
body: <p>I have been running into compilation issues when I tried to perform unit testing in golang locally, when trying to instantiate and invoke another chaincode through the MockStub object. Below is my file hierarchy:</p>
  
  <pre><code>├── transaction-chaincode
  │   ├── transaction.go
  │   ├── transaction_test.go
  │   └── vendor
  └── user-chaincode
      ├── user.go
      ├── user_test.go
      └── vendor
  </code></pre>
  
  <p>The scenario here basically involves one of the chaincode, for example user.go, calling the other chaincode transaction.go. The vendor folders in both directories contain the exact same content.</p>
  
  <p>The problem occurs when I try to instantiate a new instance of the transaction chaincode thru shim.NewMockStub in user_test.go, as the transaction mock object looks for the init method from within transaction-chaincode/vendor/ instead of user-chaincode/vendor/, despite the vendor folders having the same packages (and thus the same method).</p>
  
  <p>I was able to get rid of this error by having a single vendor folder at the parent directory of transaction-chaincode &amp; user-chaincode, but I cannot do so for developmental purposes.  How would you suggest I solve this unit testing problem while keeping the vendor folders in their respective locations?</p>