Few test code improvements