optimize first search test case.