static Map<TaskId, Integer> computeTasksToRemainingStandbys(final int numStandbyReplicas,
                                                                final Set<TaskId> statefulTaskIds) {
        return statefulTaskIds.stream().collect(toMap(Function.identity(), t -> numStandbyReplicas));
    }
@Test
    public void shouldComputeTasksToRemainingStandbys() {
        assertThat(
            computeTasksToRemainingStandbys(0, ACTIVE_TASKS),
            equalTo(
                ACTIVE_TASKS.stream().collect(Collectors.toMap(Function.identity(), it -> 0))
            )
        );
        assertThat(
            computeTasksToRemainingStandbys(5, ACTIVE_TASKS),
            equalTo(
                ACTIVE_TASKS.stream().collect(Collectors.toMap(Function.identity(), it -> 5))
            )
        );
    }