public async Task CreateNewCase_ValidationProblem() { // Arrange var caseModel = new NewCaseModel { CaseNumber = "Cn1", AppealNumber = 0, CaseTypeId = 1, CourtId = 1, LawyerId = 1, LocationId = 1 }; _sut.ModelState.AddModelError("Field", "Sample Error Details"); // Act await _sut.CreateNewCase(caseModel); // Assert await _mockCourtCasesService.DidNotReceiveWithAnyArgs().ExistsCaseNumberAsync(default, default);