public function withCode(int $expectedCode): self
    {
        assertThat(
                $this->actualException->getCode(),
                new Wrap(equals($expectedCode), 'exception code %s')
        );
        return $this;
    }