### Question:
Groups { public void addOrChangeGroup(Group group, ACS acs) throws SQLException { checkPermission(group, acs); addOrChangeGroupImpl(group, acs); group.setUnittype(unittype); nameMap.put(group.getName(), group); idMap.put(group.getId(), group); if (group.getOldName() != null) { nameMap.remove(group.getOldName()); group.setOldName(null); } } Groups(Map<Integer, Group> idMap, Map<String, Group> nameMap, Unittype unittype); Group getById(Integer id); Group getByName(String name); Group[] getGroups(); @Override String toString(); void addOrChangeGroup(Group group, ACS acs); List<Group> getTopLevelGroups(); void deleteGroup(Group group, ACS acs); Unittype getUnittype();  }### Answer:
@Test public void addOrChangeGroup() throws SQLException { String unittypeName = "Test unittype"; String groupName = "Group name"; String profileName = "Default"; Unittype unittype = TestUtils.createUnittype(unittypeName, acs); Group group = TestUtils.createGroupAndVerify(groupName, profileName, unittype, acs); assertEquals(groupName, group.getName()); assertEquals(profileName, group.getProfile().getName()); assertEquals(unittypeName, group.getUnittype().getName()); }