/*
   * the semantics of how 'data not found' is treated in this version of
   * jargon is different than how it is treated in jargon-core at the
   * connection level, that makes detection of this error difficult. For the
   * time being, semantic changes in the interpretation of this condition are
   * to be avoided.
   */
  @Ignore
  public void testExtractBundleNoOverwriteWithBulkSpecifyWrongResource() throws Exception {
    String tarName = "testExtractBundleNoOverwriteWithBulkSpecifyWrongResource.tar";
    String testSubdir = "testExtractBundleNoOverwriteWithBulkSpecifyWrongResource";
    String bunSubdir = "testExtractBundleNoOverwriteWithBulkSpecifyWrongResourceBunSubdir";
    String testExtractTargetSubdir =
        "testExtractBundleNoOverwriteWithBulkSpecifyWrongResourceTargetCollection";
    String testResource = testingProperties.getProperty(TestingPropertiesHelper.IRODS_RESOURCE_KEY);

    String fileName = "fileName.txt";
    int count = 5;

    IRODSAccount irodsAccount =
        testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);

    IRODSFile irodsFile = null;

    String targetBunIrodsCollection =
        testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties(
            testingProperties, IRODS_TEST_SUBDIR_PATH + "/" + bunSubdir);
    String targetBunFileAbsPath = targetBunIrodsCollection + "/" + tarName;
    irodsFile = new IRODSFile(irodsFileSystem, targetBunIrodsCollection);
    irodsFile.mkdir();

    String targetIrodsCollection =
        testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties(
            testingProperties, IRODS_TEST_SUBDIR_PATH + "/" + testSubdir);
    irodsFile = new IRODSFile(irodsFileSystem, targetIrodsCollection);
    irodsFile.mkdir();

    String myTarget = "";

    for (int i = 0; i < count; i++) {
      myTarget = targetIrodsCollection + "/c" + (10000 + i) + fileName;
      irodsFile = new IRODSFile(irodsFileSystem, myTarget);
      irodsFile.createNewFile();
    }

    IRODSAccessObjectFactory accessObjectFactory =
        IRODSAccessObjectFactoryImpl.instance(irodsFileSystem.getCommands());

    BulkFileOperationsAO bulkFileOperationsAO = accessObjectFactory.getBulkFileOperationsAO();
    bulkFileOperationsAO.createABundleFromIrodsFilesAndStoreInIrods(
        targetBunFileAbsPath, targetIrodsCollection, testResource);

    // extract the bun file now to a different subdir
    targetIrodsCollection =
        testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties(
            testingProperties, IRODS_TEST_SUBDIR_PATH + "/" + testExtractTargetSubdir);

    IRODSFile extractSubdir = new IRODSFile(irodsFileSystem, targetIrodsCollection);

    extractSubdir.mkdirs();

    bulkFileOperationsAO.extractABundleIntoAnIrodsCollectionWithBulkOperationOptimization(
        targetBunFileAbsPath,
        targetIrodsCollection,
        testingProperties.getProperty(TestingPropertiesHelper.IRODS_SECONDARY_RESOURCE_KEY));

    IRODSFile targetColl = new IRODSFile(irodsFileSystem, targetIrodsCollection);

    targetIrodsCollection =
        testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties(
            testingProperties, IRODS_TEST_SUBDIR_PATH + "/" + testSubdir);
    IRODSFile sourceColl = new IRODSFile(irodsFileSystem, targetIrodsCollection);

    // assertionHelper.assertTwoFilesAreEqualByRecursiveTreeComparison(
    // sourceColl, targetColl);

  }