public void RefetchRoutingRuleData_ErrorResponse_Failure() { Reset(); RoutingRule oRule = new RoutingRule(_mockServer, ""); _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), It.IsAny <bool>())).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); var res = oRule.RefetchRoutingRuleData(); Assert.IsFalse(res.Success, "Calling RefetchRoutingRuleData with Error response should fail"); }