Refactor Assert.raise_exception