@Override
    public JobStatus getJobStatus() {
        return JobStatus.CANCELLING;
    }
@Test
    void testStateDoesNotExposeGloballyTerminalExecutionGraph() throws Exception {
        try (MockStateWithExecutionGraphContext ctx = new MockStateWithExecutionGraphContext()) {
            StateTrackingMockExecutionGraph meg = new StateTrackingMockExecutionGraph();
            Canceling canceling = createCancelingState(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.CANCELED);

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

            assertThat(canceling.getJobStatus()).isEqualTo(JobStatus.CANCELLING);
            assertThat(canceling.getJob().getState()).isEqualTo(JobStatus.CANCELLING);
            assertThat(canceling.getJob().getStatusTimestamp(JobStatus.CANCELED)).isZero();
        }
    }