public void AttachFileTest()
        {
            String parentId = ConfigurationManager.AppSettings["AttachmentParentId"];

            Assert.IsTrue(String.IsNullOrWhiteSpace(parentId) == false, "The AttachmentParentId app setting is blank. Please specify the id of a salesforce record to attach an attachment file.");

            // Create Attachment Job
            CreateJobRequest attachmentJobRequest = buildDefaultAttachmentJobRequest();
            Job attachmentJob = _apiClient.CreateJob(attachmentJobRequest);

            // Create file to attach to record
            String filename = "BulkAPIClientAttachment.txt";

            File.WriteAllText(filename, "Hello From Attach File Test");

            // Create attachment batch request
            CreateAttachmentBatchRequest attachmentBatchRequest = new CreateAttachmentBatchRequest();

            attachmentBatchRequest.FilePath = filename;
            attachmentBatchRequest.JobId    = attachmentJob.Id;
            attachmentBatchRequest.ParentId = parentId;

            // Create attachment batch
            Batch attachmentBatch = _apiClient.CreateAttachmentBatch(attachmentBatchRequest);

            // Close job so no more batches are added.
            _apiClient.CloseJob(attachmentJob.Id);

            attachmentJob = _apiClient.GetCompletedJob(attachmentJob.Id);

            Assert.AreEqual(1, attachmentJob.NumberRecordsProcessed, "The file was not attached to the specified record.");
        }