public int getIndex(String name) {
        for (int i = 0; i < this.size(); i++) {
            if (get(i).getName().equals(name)) {
                return i;
            }
        }
        throw new IllegalArgumentException("param '" + name + "' not found");
    }
@Test
    public void getIndex() {
        paramsConfig = new ParamsConfig();
        ParamConfig one = new ParamConfig("name", "value");
        paramsConfig.add(one);
        ParamConfig two = new ParamConfig("other", "other-value");
        paramsConfig.add(two);

        assertThat(paramsConfig.getIndex("other")).isEqualTo((1));
        assertThat(paramsConfig.getIndex("name")).isEqualTo((0));
    }