void () { ParametersList params = new ParametersList(); params.addParamsGroup("id1"); ParamsGroup group2 = params.addParamsGroup("id2"); ParamsGroup group3 = params.addParamsGroup("id3"); ParamsGroup group4 = params.addParamsGroup("id4"); params.removeParamsGroup(0); assertEquals(asList(group2, group3, group4), params.getParamsGroups()); params.removeParamsGroup(1); assertEquals(asList(group2, group4), params.getParamsGroups()); }