@Override
    public JobStatus getJobStatus() {
        return JobStatus.RESTARTING;
    }
@Test
    void testStateDoesNotExposeGloballyTerminalExecutionGraph() throws Exception {
        try (MockRestartingContext ctx = new MockRestartingContext()) {
            StateTrackingMockExecutionGraph mockExecutionGraph =
                    new StateTrackingMockExecutionGraph();
            Restarting restarting = createRestartingState(ctx, mockExecutionGraph);

            // ideally we'd just delay the state transitions, but the context does not support that
            ctx.setExpectWaitingForResources();
            mockExecutionGraph.completeTerminationFuture(JobStatus.CANCELED);

            // this is just a sanity check for the test
            assertThat(restarting.getExecutionGraph().getState()).isEqualTo(JobStatus.CANCELED);

            assertThat(restarting.getJobStatus()).isEqualTo(JobStatus.RESTARTING);
            assertThat(restarting.getJob().getState()).isEqualTo(JobStatus.RESTARTING);
            assertThat(restarting.getJob().getStatusTimestamp(JobStatus.CANCELED)).isZero();
        }
    }