@Override
    public void onCompletedCheckpoint() {
        triggerPotentialRescale();
    }
@Test
    public void testTriggerRescaleOnCompletedCheckpoint() throws Exception {
        final AtomicBoolean rescaleTriggered = new AtomicBoolean();
        final RescaleManager.Factory rescaleManagerFactory =
                new TestingRescaleManager.Factory(() -> {}, () -> rescaleTriggered.set(true));
        try (MockExecutingContext ctx = new MockExecutingContext()) {
            final Executing testInstance =
                    new ExecutingStateBuilder()
                            .setRescaleManagerFactory(rescaleManagerFactory)
                            .build(ctx);

            assertThat(rescaleTriggered).isFalse();
            testInstance.onCompletedCheckpoint();
            assertThat(rescaleTriggered).isTrue();
        }
    }