add wait expectation code