Changed the way tests are generated