### Question:
GroupParameters { public void addOrChangeGroupParameter(GroupParameter groupParameter, ACS acs) throws SQLException { Groups.checkPermission(group, acs); if (groupParameter.getId() == null) { for (GroupParameter gp : getGroupParameters()) { Parameter p1 = gp.getParameter(); Parameter p2 = groupParameter.getParameter(); if (p1.getUnittypeParameter().getName().equals(p2.getUnittypeParameter().getName()) && p1.getOp() == p2.getOp() && p1.getValue().equals(p2.getValue())) { groupParameter.setId(gp.getId()); return; } } } addOrChangeGroupParameterImpl(groupParameter, group, acs); nameMap.put(groupParameter.getName(), groupParameter); idMap.put(groupParameter.getId(), groupParameter); } GroupParameters(
      Map<String, GroupParameter> nameMap, Map<Integer, GroupParameter> idMap, Group group); GroupParameter getByName(String name); GroupParameter getById(Integer id); @Override String toString(); GroupParameter[] getGroupParameters(); List<Parameter> getParameters(); List<Parameter> getAllParameters(Group group); void addOrChangeGroupParameter(GroupParameter groupParameter, ACS acs); void deleteGroupParameter(GroupParameter groupParameter, ACS acs);  }### Answer:
@Test public void addOrChangeGroupParameter() throws SQLException { String unittypeName = "Test unittype"; String groupName = "Group name"; String profileName = "Default"; String utpParamName = "Test.Test"; String value = "Hei"; List<TestUtils.Param> params = Collections.singletonList(new TestUtils.Param(utpParamName, "X")); Unittype unittype = TestUtils.createUnittype(unittypeName, acs); TestUtils.createUnittypeParameters(unittype, params, acs); Group group = TestUtils.createGroupAndVerify(groupName, profileName, unittype, acs); GroupParameter groupParameter = TestUtils.createGroupParameterAndVerify(utpParamName, value, unittype, group, acs); GroupParameter byId = group.getGroupParameters().getById(groupParameter.getId()); assertEquals(value, byId.getParameter().getValue()); }