moved test generation logic to Test model, and revised performance