public GroupInformation updateGroup(DbSession dbSession, GroupDto group, @Nullable String newName) {
    checkGroupIsNotDefault(dbSession, group);
    return groupDtoToGroupInformation(updateName(dbSession, group, newName), dbSession);
  }
@Test
  public void updateGroup_updatesGroupName() {
    GroupDto group = mockGroupDto();
    mockDefaultGroup();

    when(dbClient.groupDao().update(dbSession, group)).thenReturn(group);
    groupService.updateGroup(dbSession, group, "new-name");
    verify(group).setName("new-name");
    verify(dbClient.groupDao()).update(dbSession, group);
  }