Make unit test more flexible