title: Run function/behaviour after all behaviours ended in Pony
body: <p>I have a simple Publish-Subscriber that I want to write tests for.
  The methods called here are all behaviours, except <code>get_number_consumed_messages</code> that would be a function.</p>
  
  <pre><code>class iso _SinglePubSub is UnitTest
      fun name(): String =&gt; "single publish/consume"
  
      fun apply(h: TestHelper) =&gt;
          let p = Publisher("publisher message", h.env.out)
          let queue = Queue(1, h.env.out)
          let c = Consumer(h.env.out)
  
          p.publish_message(queue)
          p.publish_message(queue)
          c.consume_message(queue)
          c.consume_message(queue)
  
          //Run after all behaviours are done
          let n = c.get_number_consumed_messages()
          h.assert_eq[USize](2, n)
  </code></pre>
  
  <p>How would someone implement the <code>get_number_consumed_messages</code> function/behaviour or how would you have to modify the test function?</p>