Add some unit test cases to cover recently fixed bugs in tools.analyzer