test_class.declarator: userMetricsRepository
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private UserMetricsRepository userMetricsRepository;
test_class.type: UserMetricsRepository
test_class.var_name: userMetricsRepository
test_class.file: mirrorgate-api/src/test/java/com/bbva/arq/devops/ae/mirrorgate/repository/UserMetricsRepositoryImplTest.java
test_class.identifier: UserMetricsRepositoryImplTest
test_case.body: @Test
      public void findUserMetricsByMultipleViewIdsTest() {
          final List<String> viewIds = Arrays.asList("AWS/111111111111", "GCP/222222222222");
  
          final List<UserMetric> userMetrics = userMetricsRepository.findAllStartingWithViewId(viewIds);
  
          assertEquals(2, userMetrics.size());
  
          assertTrue(userMetrics.stream().map(UserMetric::getViewId).collect(Collectors.toList())
              .contains("AWS/111111111111/elb/elb1"));
          assertTrue(userMetrics.stream().map(UserMetric::getViewId).collect(Collectors.toList())
              .contains("GCP/222222222222/elb/elb1"));
      }
test_case.class_method_signature: UserMetricsRepositoryImplTest.findUserMetricsByMultipleViewIdsTest()
test_case.full_signature: @Test public void findUserMetricsByMultipleViewIdsTest()
test_case.identifier: findUserMetricsByMultipleViewIdsTest
test_case.invocations: asList findAllStartingWithViewId assertEquals size assertTrue contains collect map stream toList assertTrue contains collect map stream toList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findUserMetricsByMultipleViewIdsTest()
focal_class.declarator: mongoTemplate
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private MongoTemplate mongoTemplate;
focal_class.type: MongoTemplate
focal_class.var_name: mongoTemplate
focal_class.file: mirrorgate-api/src/main/java/com/bbva/arq/devops/ae/mirrorgate/repository/UserMetricsRepositoryImpl.java
focal_class.identifier: UserMetricsRepositoryImpl
focal_class.interfaces: implements UserMetricsRepositoryCustom
focal_class.class_method_signature: UserMetricsRepositoryImpl.findAllStartingWithViewId(final List<String> viewIds)
focal_class.full_signature: @Override public List<UserMetric> findAllStartingWithViewId(final List<String> viewIds)
focal_class.identifier: findAllStartingWithViewId
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> viewIds)
focal_class.return: List<UserMetric>
focal_class.signature: List<UserMetric> findAllStartingWithViewId(final List<String> viewIds)
focal_class.class_method_signature: UserMetricsRepositoryImpl.getCriteriaExpressionsForUserMetrics(final List<String> viewIds)
focal_class.full_signature: private Criteria getCriteriaExpressionsForUserMetrics(final List<String> viewIds)
focal_class.identifier: getCriteriaExpressionsForUserMetrics
focal_class.modifiers: private
focal_class.parameters: (final List<String> viewIds)
focal_class.return: Criteria
focal_class.signature: Criteria getCriteriaExpressionsForUserMetrics(final List<String> viewIds)
focal_method.body: @Override
      public List<UserMetric> findAllStartingWithViewId(final List<String> viewIds) {
  
          final Aggregation agg = newAggregation(
              match(getCriteriaExpressionsForUserMetrics(viewIds))
          );
  
          final AggregationResults<UserMetric> aggregationResult
              = mongoTemplate.aggregate(agg, UserMetric.class, UserMetric.class);
  
          return aggregationResult.getMappedResults();
      }
focal_method.class_method_signature: UserMetricsRepositoryImpl.findAllStartingWithViewId(final List<String> viewIds)
focal_method.full_signature: @Override public List<UserMetric> findAllStartingWithViewId(final List<String> viewIds)
focal_method.identifier: findAllStartingWithViewId
focal_method.invocations: newAggregation match getCriteriaExpressionsForUserMetrics aggregate getMappedResults
focal_method.modifiers: @Override public
focal_method.parameters: (final List<String> viewIds)
focal_method.return: List<UserMetric>
focal_method.signature: List<UserMetric> findAllStartingWithViewId(final List<String> viewIds)