@Override
    public boolean isState(State expectedState) {
        return expectedState == this.state;
    }
@Test
    void testIsState() throws Exception {
        final AdaptiveScheduler scheduler =
                new AdaptiveSchedulerBuilder(
                                createJobGraph(),
                                mainThreadExecutor,
                                EXECUTOR_RESOURCE.getExecutor())
                        .build();

        final State state = scheduler.getState();

        assertThat(scheduler.isState(state)).isTrue();
        assertThat(scheduler.isState(new DummyState())).isFalse();
    }