LPS-51220 Refine test logic