Refine tests after code review