better mocking; move to a separate test