Adding stable and working version of GenerateTests.