test_class.declarator: factory
test_class.modifier: private
test_class.original_string: private AggregatorFactory factory;
test_class.type: AggregatorFactory
test_class.var_name: factory
test_class.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/aggregation/operation/AggregatorFactoryTest.java
test_class.identifier: AggregatorFactoryTest
test_case.body: @Test(expected = IllegalArgumentException.class)
      public void shouldReturnEmptyAggregator() {
          AggregationParameters parameters = new AggregationParameters();
          parameters.addGroupBy("0000");
  
          Aggregator actual = factory.get(parameters);
      }
test_case.class_method_signature: AggregatorFactoryTest.shouldReturnEmptyAggregator()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void shouldReturnEmptyAggregator()
test_case.identifier: shouldReturnEmptyAggregator
test_case.invocations: addGroupBy get
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReturnEmptyAggregator()
focal_class.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/aggregation/operation/AggregatorFactory.java
focal_class.identifier: AggregatorFactory
focal_class.class_method_signature: AggregatorFactory.get(AggregationParameters parameters)
focal_class.full_signature: public Aggregator get(AggregationParameters parameters)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (AggregationParameters parameters)
focal_class.return: Aggregator
focal_class.signature: Aggregator get(AggregationParameters parameters)
focal_method.body: public Aggregator get(AggregationParameters parameters) {
  
          // return empty aggregator if empty
          if (parameters.getOperations().isEmpty() || parameters.getGroupBy().isEmpty()) {
              throw new IllegalArgumentException("Invalid aggregation parameters");
          }
  
          final AggregationOperation operation = parameters.getOperations().get(0);
          String groupBy = parameters.getGroupBy().get(0);
  
          switch (operation.getOperator()) {
          case AVERAGE:
              return new Average(groupBy, operation.getColumnId());
          case MIN:
              return new Min(groupBy, operation.getColumnId());
          case MAX:
              return new Max(groupBy, operation.getColumnId());
          case SUM:
              return new Sum(groupBy, operation.getColumnId());
          default:
              throw new IllegalArgumentException("Operation '" + operation.getOperator() + "' not supported");
          }
      }
focal_method.class_method_signature: AggregatorFactory.get(AggregationParameters parameters)
focal_method.full_signature: public Aggregator get(AggregationParameters parameters)
focal_method.identifier: get
focal_method.invocations: isEmpty getOperations isEmpty getGroupBy get getOperations get getGroupBy getOperator getColumnId getColumnId getColumnId getColumnId getOperator
focal_method.modifiers: public
focal_method.parameters: (AggregationParameters parameters)
focal_method.return: Aggregator
focal_method.signature: Aggregator get(AggregationParameters parameters)