public static void validate(ProjectMeasuresQuery query) {
    validateFilterKeys(query.getMetricCriteria().stream().map(MetricCriterion::getMetricKey).collect(Collectors.toSet()));
    validateSort(query.getSort());
  }
@Test
  public void query_with_empty_metrics_is_valid() {
    ProjectMeasuresQueryValidator.validate(new ProjectMeasuresQuery());
  }