@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_details() {
        ConfigChangeAction containerAction = validate(model(1, 1, 1, 1), model(2, 1, 1, 1)).get(0);
        assertEquals(ConfigChangeAction.Type.RESTART, containerAction.getType());
        assertEquals("service 'container' of type container on host0", containerAction.getServices().get(0).toString());
        assertEquals(false, containerAction.ignoreForInternalRedeploy());

        ConfigChangeAction contentAction = validate(model(1, 1, 1, 1), model(1, 1, 2, 1)).get(0);
        assertEquals(ConfigChangeAction.Type.RESTART, contentAction.getType());
        assertEquals("service 'searchnode' of type searchnode on host3", contentAction.getServices().get(0).toString());
        assertFalse(contentAction.ignoreForInternalRedeploy());
    }