make unit tests more robust