@Test
public void testSuccess() {

    // Mock response
    final SparkJobResponse response = new SparkJobResponse();
    response.setId("mock-job");
    response.setResult(new SparkJobResult());
    response.setStatus(SparkJobResponse.Status.SUCCESS);
    // Test first subscriber
    final DefaultSparkJobContext context = DefaultSparkJobContext.create(() -> response, cache, executor);
    Assert.assertNotNull(take(context));
    // Test second subscriber
    Assert.assertEquals(response.getResult(), take(context).getResult());
}