AggregateProcess implements VectorProcess { public static Results process(SimpleFeatureCollection features, String aggAttribute, Set<AggregationFunction> functions, Boolean singlePass, ProgressListener progressListener) throws ProcessException, IOException { AggregateProcess process = new AggregateProcess(); return process.execute(features, aggAttribute, functions, singlePass, progressListener); }  static Results process(SimpleFeatureCollection features, String aggAttribute, Set<AggregationFunction> functions, Boolean singlePass, ProgressListener progressListener); @DescribeResult(name = "result", description = "Aggregation results (one value for each function computed)") Results execute(
            @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features,
            @DescribeParameter(name = "aggregationAttribute", min = 0, description = "Attribute on which to perform aggregation") String aggAttribute,
            @DescribeParameter(name = "function", description = "An aggregate function to compute. Functions include Count, Average, Max, Median, Min, StdDev, and Sum.", collectionType = AggregationFunction.class) Set<AggregationFunction> functions,
            @DescribeParameter(name = "singlePass", description = "If True computes all aggregation values in a single pass (this will defeat DBMS-specific optimizations)", defaultValue = "false") boolean singlePass,
            ProgressListener progressListener);  }
@Test public void testSum() throws Exception { SimpleFeatureSource source = bugs.getFeatureSource("bugsites"); Set<AggregationFunction> functions = EnumSet.of(AggregationFunction.Sum); Results result = AggregateProcess.process( source.getFeatures(), "cat", functions, true, null ); assertTrue( result.sum > 0 ); }