public void Setup() { requestMock = new Mock <IRestRequest>(); requestFactoryMock = new Mock <IRestRequestFactory>(); requestFactoryMock.Setup(m => m.Create(It.IsAny <string>(), It.IsAny <Method>())).Returns(requestMock.Object); jiraApiRequestFactory = new JiraApiRequestFactory(requestFactoryMock.Object); }