code: func MockCreateChain(cid string) error {
  	var ledger ledger.PeerLedger
  	var err error
  
  	if ledger = GetLedger(cid); ledger == nil {
  		gb, _ := configtxtest.MakeGenesisBlock(cid)
  		if ledger, err = ledgermgmt.CreateLedger(gb); err != nil {
  			return err
  		}
  	}
  
  	chains.Lock()
  	defer chains.Unlock()
  
  	chains.list[cid] = &chain{
  		cs: &chainSupport{
  			Resources: &mockchannelconfig.Resources{
  				PolicyManagerVal: &mockpolicies.Manager{
  					Policy: &mockpolicies.Policy{},
  				},
  				ConfigtxValidatorVal: &mockconfigtx.Validator{},
  				ApplicationConfigVal: &mockchannelconfig.MockApplication{CapabilitiesRv: &mockchannelconfig.MockApplicationCapabilities{}},
  			},
  
  			ledger: ledger,
  		},
  	}
  
  	return nil
  }
docs: // MockCreateChain used for creating a ledger for a chain for tests
  // without having to join