this mock looks quite complicated; isn't it possible to use a simpler a mock and then use sinon ?