tb.add("integer", Integer.class);
GeometryFactory gf = new GeometryFactory();
SimpleFeatureBuilder b = new SimpleFeatureBuilder(tb.buildFeatureType());
DefaultFeatureCollection features = new DefaultFeatureCollection(null, b.getFeatureType());
DefaultFeatureCollection secondFeatures = new DefaultFeatureCollection(null, b
.getFeatureType());
Coordinate firstArray[] = new Coordinate[5];
for (int numFeatures = 0; numFeatures < 1; numFeatures++) {
firstArray[0] = new Coordinate(0, 0);
firstArray[1] = new Coordinate(1, 0);
firstArray[2] = new Coordinate(1, 1);
firstArray[3] = new Coordinate(0, 1);
firstArray[4] = new Coordinate(0, 0);
LinearRing shell = gf.createLinearRing(firstArray);
b.add(gf.createPolygon(shell, null));
b.add(0);
features.add(b.buildFeature(numFeatures + ""));
}
for (int numFeatures = 0; numFeatures < 1; numFeatures++) {
Coordinate array[] = new Coordinate[5];
array[0] = new Coordinate(firstArray[0].x - 1, firstArray[0].y - 1);
array[1] = new Coordinate(firstArray[1].x + 1, firstArray[1].y - 1);
array[2] = new Coordinate(firstArray[2].x + 1, firstArray[2].y + 1);
array[3] = new Coordinate(firstArray[3].x - 1, firstArray[3].y + 1);
array[4] = new Coordinate(firstArray[0].x - 1, firstArray[0].y - 1);
LinearRing shell = gf.createLinearRing(array);
b.add(gf.createPolygon(shell, null));
b.add(0);
secondFeatures.add(b.buildFeature(numFeatures + ""));
}
InclusionFeatureCollection process = new InclusionFeatureCollection();
SimpleFeatureCollection output = process.execute(features, secondFeatures);
assertEquals(1, output.size());
SimpleFeatureIterator iterator = output.features();