Improving performance of tests