public async Task GetCaseStatus_UnprocessableEntity() { // Arrange int caseId = 0; string expectedError = $"Invalid CaseId: {caseId}"; // Act ActionResult <CaseStatusModel> response = await _sut.GetCaseStatus(caseId); // Assert await _mockCourtCasesService.DidNotReceive().GetCaseStatusAsync(caseId); var createdAtActionResult = Assert.IsType <UnprocessableEntityObjectResult>(response.Result); Assert.Equal(expectedError, createdAtActionResult.Value); }