public function checkPredictions()
    {
        $exception = new AggregateException("Some predictions failed:\n");
        foreach ($this->prophecies as $prophecy) {
            try {
                $prophecy->checkPredictions();
            } catch (PredictionException $e) {
                $exception->append($e);
            }
        }

        $this->prophecies = [];
        MockRegistry::getInstance()->unregisterAll();

        if (count($exception->getExceptions())) {
            throw $exception;
        }

    }