public void EmpresaControllerTest_Excluir_PassandoGuidInexistente_Retorna404() { _serviceMock.Setup(x => x.ObterPorId(It.IsAny <Guid>())).Returns(() => null); var result = _controller.Excluir(It.IsAny <Guid>()); result.Should().BeOfType <NotFoundResult>(); _serviceMock.Verify(x => x.ObterPorId(It.IsAny <Guid>()), Times.Once()); _serviceMock.Verify(x => x.Excluir(It.IsAny <Guid>()), Times.Never()); }