add mock func, make test pass