ff.addType(atf.newAttributeType("geom", Geometry.class));
FeatureType type = ff.getFeatureType();
Feature f1 = type.create(new Object[]{point});
Feature f2 = type.create(new Object[]{line});
Feature f3 = type.create(new Object[]{polygon});
MemoryDataStore ds = new MemoryDataStore();
ds.createSchema(type);
ds.addFeatures(new Feature[]{f1,f2,f3});