public void GetBeerById_WhenIdIsEmptyString_ShouldReturnBadRequestWithMessage() { // Arrange var expectedMessge = "Beer ID is mandatory"; // Act IHttpActionResult result = _beersController.GetBeerById(String.Empty); // Assert Assert.NotNull(result); var badRequestErrorMessageResult = result as BadRequestErrorMessageResult; Assert.NotNull(badRequestErrorMessageResult); Assert.Equal(expectedMessge, badRequestErrorMessageResult.Message); }