@Override
    public JobStatus getJobStatus() {
        return JobStatus.FAILING;
    }
@Test
    void testStateDoesNotExposeGloballyTerminalExecutionGraph() throws Exception {
        try (MockFailingContext ctx = new MockFailingContext()) {
            StateTrackingMockExecutionGraph meg = new StateTrackingMockExecutionGraph();
            Failing failing = createFailingState(ctx, meg);

            // ideally we'd delay the async call to #onGloballyTerminalState instead, but the
            // context does not support that
            ctx.setExpectFinished(eg -> {});

            meg.completeTerminationFuture(JobStatus.FAILED);

            // this is just a sanity check for the test
            assertThat(meg.getState()).isEqualTo(JobStatus.FAILED);

            assertThat(failing.getJobStatus()).isEqualTo(JobStatus.FAILING);
            assertThat(failing.getJob().getState()).isEqualTo(JobStatus.FAILING);
            assertThat(failing.getJob().getStatusTimestamp(JobStatus.FAILED)).isZero();
        }
    }