public CompletableFuture<Result> getTerminationFuture() {
        return terminationFuture;
    }
@Test
    void testShouldShutdownIfRegistrationWithJobManagerFails() throws Exception {
        Configuration configuration = createConfiguration();
        configuration.set(
                TaskManagerOptions.REGISTRATION_TIMEOUT, TimeUtils.parseDuration("10 ms"));
        taskManagerRunner = createTaskManagerRunner(configuration);

        assertThatFuture(taskManagerRunner.getTerminationFuture())
                .eventuallySucceeds()
                .isEqualTo(TaskManagerRunner.Result.FAILURE);
    }