public static List<TriStateSelection> forAgentsResources(Set<ResourceConfig> resourceConfigs, Agents agents) {
        return convert(resourceConfigs, agents, new Assigner<>() {
            @Override
            public boolean shouldAssociate(Agent agent, ResourceConfig resourceConfig) {
                return agent.getResourcesAsList().contains(resourceConfig.getName());
            }

            @Override
            public String identifier(ResourceConfig resourceConfig) {
                return resourceConfig.getName();
            }

            @Override
            public boolean shouldEnable(Agent agent, ResourceConfig resourceConfig) {
                return true;
            }
        });
    }
@Test
    public void shouldBeNoChangeIfAllAgentsHaveThatResource() {
        resourceConfigs.add(new ResourceConfig("some"));
        agents.add(new Agent("uuid1", "host1", "127.0.0.1", List.of("some")));
        agents.add(new Agent("uuid2", "host2", "127.0.0.2", emptyList()));

        List<TriStateSelection> selections = TriStateSelection.forAgentsResources(resourceConfigs, agents);
        assertThat(selections, hasItem(new TriStateSelection("some", TriStateSelection.Action.nochange)));
    }