fixed unit test code