@Test
public void shouldHandleTheLifecycleCorrectlyOnMultipleTestRunsWithExceptions() throws Throwable
{
JUnitCore runner = new JUnitCore();
Result result = runner.run(
Request.classes(ArquillianClass1.class, ArquillianClass1.class));
Assert.assertEquals(
"Verify that both exceptions thrown bubbled up",
2, result.getFailureCount());
Assert.assertEquals(
"Verify exception thrown",
"deploy", result.getFailures().get(0).getException().getMessage());
Assert.assertEquals(
"Verify exception thrown",
"undeploy", result.getFailures().get(1).getException().getMessage());
Assert.assertFalse(result.wasSuccessful());
assertCallbacks();
}