@Test
@DirtiesContext // adding a bean
public void testPersistAddFeatureTransaction() throws Exception {

	PersistTransactionRequest request = new PersistTransactionRequest();
	request.setCrs(CRS);
	FeatureTransaction featureTransaction = new FeatureTransaction();
	featureTransaction.setLayerId(LAYER_ID);
	Feature feature = new Feature();
	GeometryFactory factory = new GeometryFactory();
	Geometry circle =
			dtoConverter.toDto(geoService.createCircle(factory.createPoint(new Coordinate(0, 0)), 10, 10));
	feature.setGeometry(circle);
	featureTransaction.setNewFeatures(new Feature[] {feature});
	request.setFeatureTransaction(featureTransaction);
	PersistTransactionResponse response = (PersistTransactionResponse) dispatcher.execute(
			PersistTransactionRequest.COMMAND, request, null, "en");
	if (response.isError()) {
		response.getErrors().get(0).printStackTrace();
	}
	Assert.assertFalse(response.isError());
	Assert.assertNotNull(response.getFeatureTransaction());
	Feature[] newFeatures = response.getFeatureTransaction().getNewFeatures();
	Assert.assertEquals(1, newFeatures.length);
	Assert.assertNotNull(newFeatures[0].getId());
}