private Set<MetricNameDto> getCustomTestGroupMetricsNamesNewModel(List<TaskDataDto> tests) {
    try {
      Set<Long> taskIds = CommonUtils.getTestsIds(tests);

      Multimap<Long, Long> testGroupMap = fetchUtil.getTestGroupIdsByTestIds(taskIds);

      List<Object[]> metricDescriptionEntities = getMetricNames(testGroupMap.keySet());

      metricDescriptionEntities =
          CommonUtils.filterMonitoring(metricDescriptionEntities, monitoringPlotGroups);

      if (metricDescriptionEntities.isEmpty()) {
        return Collections.emptySet();
      }

      Set<MetricNameDto> metrics = new HashSet<>(metricDescriptionEntities.size());

      // add test-group metric names
      for (Object[] mde : metricDescriptionEntities) {
        for (TaskDataDto td : tests) {
          Collection<Long> allTestsInGroup = testGroupMap.get((Long) mde[2]);
          if (CommonUtils.containsAtLeastOne(td.getIds(), allTestsInGroup)) {
            metrics.add(
                new MetricNameDto(
                    td, (String) mde[0], (String) mde[1], MetricNameDto.Origin.TEST_GROUP_METRIC));
          }
        }
      }

      return metrics;
    } catch (PersistenceException e) {
      log.debug(
          "Could not fetch test-group data from MetricSummaryEntity: {}",
          DataProcessingUtil.getMessageFromLastCause(e));
      return Collections.emptySet();
    }
  }