Mock object methods and dependencies.