add setHash method to mock