code: func (m *MockEndorserServer) Stop() {
  	if m.srv == nil {
  		panic("MockBroadcastServer not started")
  	}
  
  	m.srv.Stop()
  	m.wg.Wait()
  	m.srv = nil
  }
docs: // Stop the mock broadcast server and wait for completion.