public void createQprofileChangesForRuleUpdates(DbSession dbSession, Set<PluginRuleUpdate> pluginRuleUpdates) {
    List<QProfileChangeDto> changesToPersist = pluginRuleUpdates.stream()
      .flatMap(pluginRuleUpdate -> {
        RuleChangeDto ruleChangeDto = createNewRuleChange(pluginRuleUpdate);
        insertRuleChange(dbSession, ruleChangeDto);

        return findQualityProfilesForRule(dbSession, pluginRuleUpdate.getRuleUuid()).stream()
          .map(qualityProfileUuid -> buildQprofileChangeDtoForRuleChange(qualityProfileUuid, ruleChangeDto));
      }).toList();

    if (!changesToPersist.isEmpty()) {
      dbClient.qProfileChangeDao().bulkInsert(dbSession, changesToPersist);
    }
  }
@Test
  public void updateWithoutCommit_whenNoRuleChanges_thenDontInteractWithDatabase() {
    underTest.createQprofileChangesForRuleUpdates(mock(), Set.of());

    verifyNoInteractions(dbClient);
  }