Update test case with waitFor.