@Override
    public void cancel() {
        context.goToFinished(context.getArchivedExecutionGraph(JobStatus.CANCELED, null));
    }
@Test
    void testCancelTransitionsToFinished() {
        TestingStateWithoutExecutionGraph state = new TestingStateWithoutExecutionGraph(ctx, LOG);

        ctx.setExpectFinished(
                archivedExecutionGraph -> {
                    assertThat(archivedExecutionGraph.getState()).isEqualTo(JobStatus.CANCELED);
                    assertThat(archivedExecutionGraph.getFailureInfo()).isNull();
                });
        state.cancel();
    }