title: How to unit test pubsub Receive callback
body: <p>I have the following production code:</p>
  
  <pre><code>func pullMessages(ctx context.Context, sub *pubsub.Subscription) {
      err := sub.Receive(ctx, func(ctx context.Context, msg *pubsub.Message) {
          log.Printf("Got message: %q\n", string(msg.Data))
          processMessage(msg)
          msg.Ack()
      })
      if err != nil {
          log.Printf("Receive: %v", err)
      }
  }
  </code></pre>
  
  <p>How can I verify <code>processMessage</code> is actually being called in a unit test ?</p>