@Override
    public void validate(ChangeContext context) {
        for (ClusterSpec.Id clusterId : context.previousModel().allClusters()) {
            Optional<NodeResources> currentResources = resourcesOf(clusterId, context.previousModel());
            Optional<NodeResources> nextResources = resourcesOf(clusterId, context.model());
            if (currentResources.isEmpty() || nextResources.isEmpty()) continue; // new or removed cluster
            if ( changeRequiresRestart(currentResources.get(), nextResources.get()))
                createRestartActionsFor(clusterId, context.previousModel()).forEach(context::require);
        }
    }
@Test
    void test_restart_action_count() {
        assertEquals(0, validate(model(1, 1, 1, 1), model(1, 1, 1, 1)).size());
        assertEquals(1, validate(model(1, 1, 1, 1), model(2, 1, 1, 1)).size());
        assertEquals(2, validate(model(1, 1, 1, 1), model(1, 2, 1, 1)).size());
        assertEquals(3, validate(model(1, 1, 1, 1), model(1, 1, 2, 1)).size());
        assertEquals(4, validate(model(1, 1, 1, 1), model(1, 1, 1, 2)).size());
        assertEquals(5, validate(model(1, 1, 1, 1), model(2, 1, 1, 2)).size());
        assertEquals(6, validate(model(1, 1, 1, 1), model(1, 2, 1, 2)).size());
        assertEquals(7, validate(model(1, 1, 1, 1), model(1, 1, 2, 2)).size());
        assertEquals(8, validate(model(1, 1, 1, 1), model(2, 1, 2, 2)).size());
        assertEquals(9, validate(model(1, 1, 1, 1), model(1, 2, 2, 2)).size());
        assertEquals(10, validate(model(1, 1, 1, 1), model(2, 2, 2, 2)).size());
    }