protected function mockDependencies()
    {
        $dependencies = $this->getDependencyMapping();

        foreach ($dependencies as $interface => $memberName) {
            if (!isset($this->$memberName)) {
                $this->$memberName = Mockery::mock($interface);
            }

            // Update with the actual instance.
            $dependencies[$interface] = $this->$memberName;
        }

        return $dependencies;
    }