@Test
public void testJobFailed() {

    final SparkListenerJobEnd event = new SparkListenerJobEnd(1, 0, JobFailed$.MODULE$.apply(new RuntimeException()));
    apply(true, event);
    Assert.assertTrue("Expected file to exist", tempFile.exists());
}