public void ThrowNotFoundException_IfEndpointNotExist() { var exception = Assert.Throws <HttpResponseException>(() => _controller.GetServerStats("Not.Existing.EndPoint")); Assert.AreEqual(exception.Response.StatusCode, HttpStatusCode.NotFound); }