@Override
    public void configure(ResourceGroup group, SelectionContext<VariableMap> context)
    {
        Map.Entry<ResourceGroupIdTemplate, ResourceGroupSpec> entry = getMatchingSpec(group, context);
        configureGroup(group, entry.getValue());
    }
@Test
    public void testExtractVariableConfiguration() throws IOException
    {
        ResourceGroupConfigurationManager<VariableMap> manager = parse("resource_groups_config_extract_variable.json");

        VariableMap variableMap = new VariableMap(ImmutableMap.of("USER", "user", "domain", "prestodb", "region", "us_east", "cluster", "12"));

        ResourceGroupId globalId = new ResourceGroupId("global");
        manager.configure(new TestingResourceGroup(globalId), new SelectionContext<>(globalId, variableMap));

        ResourceGroupId childId = new ResourceGroupId(new ResourceGroupId("global"), "prestodb:us_east:12");
        TestingResourceGroup child = new TestingResourceGroup(childId);
        manager.configure(child, new SelectionContext<>(childId, variableMap));

        assertEquals(child.getHardConcurrencyLimit(), 3);
    }