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();
assertTrue(id.getIdentifiers().containsAll(newFids));
// remember the FeatureId with a strong reference
FeatureId tempFeatureId = (FeatureId) id.getIdentifiers().iterator().next();
assertTrue(newFids.contains(tempFeatureId));
t1.commit();
assertEquals(1, listener.list.size());
assertEquals(2, listener1.list.size());
BatchFeatureEvent batch = (BatchFeatureEvent) listener1.list.get(2);
assertFalse("confirm tempFid is not in the commit",
id.getIdentifiers().contains(tempFeatureId));
assertNotNull(batch.getFilter());
FeatureId featureId = (FeatureId) batch.getCreatedFeatureIds().iterator().next();
assertSame("confirm temp feature Id was updated", tempFeatureId, featureId);
}