public void MockgetBatchStatisticsTest()
	    {
		    //define all mocked objects as final
            var mockController = GetMockController<getBatchStatisticsRequest, getBatchStatisticsResponse>();
            var mockRequest = new getBatchStatisticsRequest
                {
                    merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey},
                };
            var batchDetaisType = new batchDetailsType
                {
                    batchId = "1234",
                };
            var mockResponse = new getBatchStatisticsResponse
                {
                    refId = "1234",
                    sessionToken = "sessiontoken",
                    batch = batchDetaisType,
                };

		    var errorResponse = new ANetApiResponse();
		    var results = new List<String>();
            const messageTypeEnum messageTypeOk = messageTypeEnum.Ok;

            SetMockControllerExpectations<getBatchStatisticsRequest, getBatchStatisticsResponse, getBatchStatisticsController>(
                mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk);
            mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM);
            //mockController.MockObject.Execute();
            // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM);
            var controllerResponse = mockController.MockObject.GetApiResponse();
            Assert.IsNotNull(controllerResponse);

		    Assert.IsNotNull(controllerResponse.batch);
            LogHelper.info(Logger, "getBatchStatistics: Details:{0}", controllerResponse.batch);
	    }
 public static void batchDetailsType(batchDetailsType argument)
 {
     if (null != argument)
     {
         if (DateTime.MinValue != argument.settlementTimeUTC) { argument.settlementTimeUTCSpecified = true; }
         if (DateTime.MinValue != argument.settlementTimeLocal) { argument.settlementTimeLocalSpecified = true; }
         if (null != argument.statistics) { foreach (var value in argument.statistics) { batchStatisticType(value); } }
     }
 }
 public static void batchDetailsType ( batchDetailsType request) 
 {
     if (null != request)
     {
         if (DateTime.MinValue != request.settlementTimeUTC) { request.settlementTimeUTCSpecified = true; }
         if (DateTime.MinValue != request.settlementTimeLocal) { request.settlementTimeLocalSpecified = true; }
     }
 }