TestOutcome testOutcome = testOutcomeForTestClass(testOutcomesIndex, testCase.getClassname());
addIfNotPresent(groupedTestOutcomes, testOutcome);
TestStep nextStep = TestStep.forStepCalled(testCase.getName()).withResult(resultOf(testCase));
Optional<Throwable> testFailure = testFailureFrom(testCase);
if (testFailure.isPresent()) {
nextStep.failedWith(testFailure.get());
}
testOutcome.recordStep(nextStep);
}
return ImmutableList.copyOf(groupedTestOutcomes);
}