public function doesNotThrow(string $unexpectedType = null): self
    {
        increaseAssertionCounter(1);
        $this->runCode();
        if (null !== $this->exception
                && (null === $unexpectedType || $this->exception instanceof $unexpectedType)) {
            throw new AssertionFailure(
                    'Failed asserting that no exception'
                    . (null !== $unexpectedType
                        ? ' of type "' . $unexpectedType . '"'
                        : ''
                    )
                    . ' is thrown, got ' . get_class($this->exception)
                    . ' with message "' . $this->exception->getMessage() . '".'
            );
        }

        return $this;
    }