Improve generated tests