title: Why does running as Junit Test lead to deterioration of performance?
body: <p>I run a function and measure the total time it takes. First this was written as a Junit test and the same written as a class with a main function. Calling the main executes the same function as run by Junit.</p>
  
  <pre><code>Via TestRunner:
  Total time taken for transformation rules: 49
  
  Via JUnit:
  Total time taken for transformation rules: 515
  </code></pre>
  
  <p>The time is measured in ms. The JUnit test takes 10x more time than running it from main function. Does JUnit do something extra which I am missing here? Why has the performance deteriorated so much?</p>