private void GivenAFeatureUsageService() { _simpleDbClient = MockRepository.GenerateStub<AmazonSimpleDB>(); _simpleDbClient .Stub(s => s.PutAttributes(Arg<PutAttributesRequest>.Is.Anything)) .Return(null); _exceptionToThrow = new Exception("Something really bad happened"); _simpleDbClient .Stub(s => s.CreateDomain(Arg<CreateDomainRequest>.Is.Anything)) .Throw(_exceptionToThrow); _domainName = "My Domain"; Action<Exception> exceptionAction = exception => _exceptions.Add(exception); _service = new SimpleDbFeatureUsageService(exceptionAction, _domainName, _simpleDbClient); }