public static int getClusterControllerIndex(ConfigId configId) {
        Matcher matcher = CONTROLLER_INDEX_PATTERN.matcher(configId.s());
        if (!matcher.matches()) {
            throw new IllegalArgumentException("Unable to extract cluster controller index from config ID " + configId);
        }

        return Integer.parseInt(matcher.group(1));
    }
@Test
    public void testGetClusterControllerIndex() {
        ConfigId configId = new ConfigId("admin/cluster-controllers/2");
        assertEquals(2, VespaModelUtil.getClusterControllerIndex(configId));
    }