code: func (ctrl *Controller) Finish() {
  	ctrl.T.Helper()
  
  	ctrl.mu.Lock()
  	defer ctrl.mu.Unlock()
  
  	if ctrl.finished {
  		ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.")
  	}
  	ctrl.finished = true
  
  	// If we're currently panicking, probably because this is a deferred call,
  	// pass through the panic.
  	if err := recover(); err != nil {
  		panic(err)
  	}
  
  	// Check that all remaining expected calls are satisfied.
  	failures := ctrl.expectedCalls.Failures()
  	for _, call := range failures {
  		ctrl.T.Errorf("missing call(s) to %v", call)
  	}
  	if len(failures) != 0 {
  		ctrl.T.Fatalf("aborting test due to missing call(s)")
  	}
  }
docs: // Finish checks to see if all the methods that were expected to be called
  // were called. It should be invoked for each Controller. It is not idempotent
  // and therefore can only be invoked once.