@@ -0,0 +1,2903 @@
+/*%0A *    GeoTools - The Open Source Java GIS Toolkit%0A *    http://geotools.org%0A *%0A *    (C) 2012, Open Source Geospatial Foundation (OSGeo)%0A *%0A *    This library is free software; you can redistribute it and/or%0A *    modify it under the terms of the GNU Lesser General Public%0A *    License as published by the Free Software Foundation;%0A *    version 2.1 of the License.%0A *%0A *    This library is distributed in the hope that it will be useful,%0A *    but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A *    Lesser General Public License for more details.%0A */%0Apackage org.geotools.process.feature.gs;%0A%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.EnumSet;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Aimport org.geotools.data.DataStore;%0Aimport org.geotools.data.property.PropertyDataStore;%0Aimport org.geotools.data.simple.SimpleFeatureCollection;%0Aimport org.geotools.data.simple.SimpleFeatureSource;%0Aimport org.geotools.process.feature.gs.AggregateProcess.AggregationFunction;%0Aimport org.geotools.process.feature.gs.AggregateProcess.Results;%0Aimport org.geotools.process.feature.gs.ReShapeProcess.Definition;%0Aimport org.geotools.test.TestData;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.opengis.feature.simple.SimpleFeatureType;%0Aimport org.opengis.feature.type.AttributeDescriptor;%0Aimport org.opengis.filter.expression.PropertyName;%0A%0A/**%0A * %0A *%0A * @source $URL$%0A */%0Apublic class ReShapeProcessTest %7B%0A    DataStore bugs;%0A    %0A    @Before%0A    public void setup() throws IOException %7B%0A        File file = TestData.file(this, null );%0A        bugs = new PropertyDataStore( file );%0A    %7D%0A    @After%0A    public void tearDown()%7B%0A        bugs.dispose();%0A    %7D%0A%0A    %0A    @Test%0A    public void testDefinition() throws Exception %7B%0A        String definition = %22the_geom=the_geom%22;%0A        List%3CDefinition%3E def = ReShapeProcess.toDefinition( definition );%0A%0A        assertEquals( 1, def.size() );%0A        %0A        assertEquals( %22the_geom%22, def.get(0).name );%0A        assertTrue( def.get(0).expression instanceof PropertyName );%0A    %7D%0A%0A    @Test%0A    public void testSum() throws Exception %7B%0A        SimpleFeatureSource source = bugs.getFeatureSource(%22bugsites%22);%0A%0A        %0A        ReShapeProcess process = new ReShapeProcess();%0A        %0A        String definition = %22the_geom=the_geom%5Cnnumber=cat%22;%0A        SimpleFeatureCollection origional = source.getFeatures();%0A        SimpleFeatureCollection result = process.execute( origional, definition );%0A        %0A        assertEquals( origional.size(), result.size() );%0A        %0A        SimpleFeatureType schema = result.getSchema();%0A        AttributeDescriptor number = schema.getDescriptor(%22number%22);%0A        assertTrue( Long.class.isAssignableFrom( number.getType().getBinding() ) );%0A%0A    %7D%0A%0A%7D%0A

Add a test case to confirm expected schema generated by ReShapeOperation; also added a couple of headers to the various test cases