public GroupInformation updateGroup(DbSession dbSession, GroupDto group, @Nullable String newName) {
    checkGroupIsNotDefault(dbSession, group);
    return groupDtoToGroupInformation(updateName(dbSession, group, newName), dbSession);
  }
@Test
  public void updateGroup_whenGroupIsDefault_throws() {
    GroupDto defaultGroup = mockDefaultGroup();
    when(dbClient.groupDao().selectByName(dbSession, DEFAULT_GROUP_NAME)).thenReturn(Optional.of(defaultGroup));

    assertThatExceptionOfType(IllegalArgumentException.class)
      .isThrownBy(() -> groupService.updateGroup(dbSession, defaultGroup, "new-name", "New Description"))
      .withMessage("Default group 'sonar-users' cannot be used to perform this action");

    assertThatExceptionOfType(IllegalArgumentException.class)
      .isThrownBy(() -> groupService.updateGroup(dbSession, defaultGroup, "new-name"))
      .withMessage("Default group 'sonar-users' cannot be used to perform this action");
  }