}
private SimpleFeatureCollection createTestDefQueryFeatureCollection()
throws Exception {
MemoryDataStore data = new MemoryDataStore();
SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
builder.setName("querytest");
builder.add("id", String.class);
builder.add("point", Point.class);
builder.add("line", LineString.class);
builder.add("polygon", Polygon.class);
SimpleFeatureType type = builder.buildFeatureType();
GeometryFactory gf = new GeometryFactory();
SimpleFeature f;
LineString l;
Polygon p;
l = line(gf, new int[] { 20, 20, 100, 20, 100, 100 });
p = (Polygon) l.convexHull();
f = SimpleFeatureBuilder.build(type, new Object[] { "ft1", point(gf, 20, 20), l, p },
"test.1");
data.addFeature(f);
l = line(gf, new int[] { 130, 130, 110, 110, 110, 130, 30, 130 });
p = (Polygon) l.convexHull();
f = SimpleFeatureBuilder.build(type, new Object[] { "ft2", point(gf, 130, 130), l, p },
"test.2");
data.addFeature(f);
l = line(gf, new int[] { 150, 150, 190, 140, 190, 190 });
p = (Polygon) l.convexHull();
f = SimpleFeatureBuilder.build(type, new Object[] { "ft3", point(gf, 150, 150), l, p },
"test.3");
data.addFeature(f);
String typeName = type.getTypeName();
return data.getFeatureSource(typeName).getFeatures();
}