title: How to test logging in junit5?
body: <p>I am transitioning from junit4 to junit5 on a project and trying to figure out how to test logs.  Previously, I used</p>
  
  <pre><code>@Rule
  OutputCapture outputCapture = new OutputCapture();
  </code></pre>
  
  <p>and would then write an assertion using <code>outputCapture.toString()</code>, for example</p>
  
  <p><code>assertThat(outputCapture.toString(),containsString("status=200"));</code></p>
  
  <p>Since <code>@Rule</code> annotation hasn't been implemented yet in junit5, I can't use outputCapture.  Any ideas what to do instead?  Thanks!</p>