title: ParameterizedAssertionError using EasyTest when test case fails
body: <p>I wanted to try EasyTest to get input parameters from a CSV and found the following, nicely written, example in a blog posted here:</p>
  
  <p><a href="http://gpcmol.blogspot.com/2013/06/easytest-unit-testing-with-externalized.html" rel="nofollow noreferrer">http://gpcmol.blogspot.com/2013/06/easytest-unit-testing-with-externalized.html</a></p>
  
  <p>If I follow the example it runs beautifully giving me a nice PDF output as advertised.</p>
  
  <p>However if I cause a test case failure, by changing the last line of input from ",9,-12" to ",9,-13", I no longer get PDF output and get 2 failures rather than one.  </p>
  
  <p>The first failure is the correct assertion that the test case fails.  The second failure is the following exception:</p>
  
  <pre><code>&lt;testcase name="classMethod" classname="TransformCelciusTest" time="0.0"&gt;
      &lt;failure message="org.junit.experimental.theories.internal.ParameterizedAssertionError: testToCelsiusConverter(TestInfo [testClass=org.junit.runners.model.TestClass@90bb3e6, dataLoader=org.easetech.easytest.loader.CSVDataLoader@5f4fc5ad, filePaths=[data/temperatureConversionData.csv], methodName=testToCelsiusConverter])" type="org.junit.experimental.theories.internal.ParameterizedAssertionError"&gt;org.junit.experimental.theories.internal.ParameterizedAssertionError: testToCelsiusConverter(TestInfo [testClass=org.junit.runners.model.TestClass@90bb3e6, dataLoader=org.easetech.easytest.loader.CSVDataLoader@5f4fc5ad, filePaths=[data/temperatureConversionData.csv], methodName=testToCelsiusConverter])
      at org.easetech.easytest.util.RunAftersWithOutputData.writeData(RunAftersWithOutputData.java:157)
      at org.easetech.easytest.util.RunAftersWithOutputData.evaluate(RunAftersWithOutputData.java:133)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
      at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
      at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
      at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
      at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:105)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
      at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: java.lang.RuntimeException: java.lang.NullPointerException
      at org.easetech.easytest.loader.CSVDataLoader.writeDataToCSV(CSVDataLoader.java:364)
      at org.easetech.easytest.loader.CSVDataLoader.writeData(CSVDataLoader.java:180)
      at org.easetech.easytest.util.RunAftersWithOutputData.writeData(RunAftersWithOutputData.java:154)
      ... 27 more
  Caused by: java.lang.NullPointerException
      at org.easetech.easytest.loader.CSVDataLoader.writeOutputData(CSVDataLoader.java:382)
      at org.easetech.easytest.loader.CSVDataLoader.writeDataToCSV(CSVDataLoader.java:347)
      ... 29 more
  &lt;/failure&gt;
    &lt;/testcase&gt;
  </code></pre>
  
  <p>Anybody understand how to modify the example so that it properly completes without the ParameterizedAssertionError exception so that the test case failure can be properly reported in the output (PDF)?</p>
  
  <p>I think this is related:
  <a href="https://stackoverflow.com/questions/13751161/junit-theory-is-there-a-way-to-throw-meaningful-exception">JUnit @Theory : is there a way to throw meaningful exception?</a></p>