title: Does TestNG support something like JUnit4's @Rule?
body: <p>Does TestNG have something like <code>@Rule</code>? I am thinking specifically about:</p>
  
  <pre><code>@Rule public TemporaryFolder folder = ...
  </code></pre>
  
  <p>Or even</p>
  
  <pre><code>@Rule public MethodRule globalTimeout = new Timeout(20);
  </code></pre>
  
  <p>I am aware that I can manually implement these things using <code>setUp()</code> and <code>tearDown()</code> equivalents, but these don't give me the convenience that I get using <code>@Rule</code>.</p>