title: Simple way to test Spring onApplicationEvent
body: <p>I have an application event listener which contains the function:</p>
  
  <pre><code>@Override
  public void onApplicationEvent(ContextRefreshedEvent event) {
  //do some stuff
  }
  </code></pre>
  
  <p>How can I write a unit test to simulate a ContextRefreshedEvent, like my jar being executed, and test that my onApplicationEvent function did what it's supposed to do?</p>