public ServiceBusListenerTests() { DataServiceProvider.AlwaysNewDS = false; var mock = new Mock <IDataService>(); mock.Setup(ds => ds.UpdateObject(It.Is <DataObject>(obj => true))); DataServiceFactory.Init(mock.Object); }