public void ThrowImgurExceptionIfResponseIsNull_WithNullResponse_ThrowsImgurException() { var responseConverter = new ResponseConverter(); var exception = Record.Exception(() => { responseConverter.ThrowImgurExceptionIfResponseIsNull(null); }); Assert.NotNull(exception); Assert.IsType <ImgurException>(exception); Assert.Contains("missing", exception.Message); }