public void DownloadGame_GetsInvalidKey_ReturnsNull() { // Arrange var mock = new Mock <IStoreService>(); mock.Setup(a => a.GetGame(It.IsAny <string>())).Throws(new ValidationException("", "")); var sut = new GamesController(mock.Object, _loggerMock.Object); // Act var res = sut.Download("invalid-key"); // Assert Assert.That(res, Is.Null); }