// is as expected.
assertEquals(8, origional.getCount(Query.ALL));
// we are going to use this transaction to modify and commit
DefaultTransaction t1 = new DefaultTransaction("Transaction 1");
SimpleFeatureStore featureStore1 = (SimpleFeatureStore) dataStore
.getFeatureSource(typeName);
featureStore1.setTransaction(t1);
TestFeatureListener listener1 = new TestFeatureListener();
featureStore1.addFeatureListener(listener1);
// verify they are all working
assertEquals(8, origional.getCount(Query.ALL));
assertEquals(8, featureStore1.getCount(Query.ALL));
SimpleFeatureType schema = origional.getSchema();
SimpleFeatureBuilder build = new SimpleFeatureBuilder(schema);
int value = 24;
build.add(Integer.valueOf(value));
build.add(Short.valueOf((short) value));
build.add(new Float(value / 10.0F));
build.add(new Double(value / 10D));
build.add("FEATURE_" + value);
Calendar cal = Calendar.getInstance();
cal.set(2004, 06, value, 0, 0, 0);
build.add(cal);
WKTReader reader = new WKTReader();
build.add(reader.read("POINT(1 1)"));
SimpleFeature newFeature = build.buildFeature(null);
SimpleFeatureCollection newFeatures = DataUtilities.collection(newFeature);
List<FeatureId> newFids = featureStore1.addFeatures(newFeatures);
assertEquals(0, listener.list.size());
assertEquals(1, listener1.list.size());
FeatureEvent e = listener1.list.get(0);
Id id = (Id) e.getFilter();