Fix logic of testcase.