postAsDOM("wfs", insert);
assertEquals(2, listener.events.size());
TransactionEvent firstEvent = (TransactionEvent) listener.events.get(0);
assertEquals(TransactionEventType.PRE_UPDATE, firstEvent.getType());
assertEquals(MockData.POLYGONS, firstEvent.getLayerName());
Feature updatedBefore = (Feature) listener.features.get(0);
assertEquals("t0002", updatedBefore.getProperty("id").getValue());
TransactionEvent secondEvent = (TransactionEvent) listener.events.get(1);
assertEquals(TransactionEventType.POST_UPDATE, secondEvent.getType());
assertEquals(MockData.POLYGONS, secondEvent.getLayerName());
Feature updatedAfter = (Feature) listener.features.get(1);
assertEquals("t0003", updatedAfter.getProperty("id").getValue());
assertEquals(2, listener.features.size());
}