fix expect_num_calls method