More unit test improvements