* @param result JUnit Test Run Result
* @return The TestResult representation of the JUnit Result
*/
private TestResult convertToTestResult(Result result, Throwable expectedException)
{
Status status = Status.PASSED;
Throwable throwable = expectedException;
if (result.getFailureCount() > 0)
{
status = Status.FAILED;
throwable = result.getFailures().get(0).getException();