public static GeneratorResult run(String resolverPath,
                                    String defaultPackage,
                                    final boolean generateImported,
                                    final boolean generateDataTemplates,
                                    RestliVersion version,
                                    RestliVersion deprecatedByVersion,
                                    String targetDirectoryPath,
                                    String[] sources)
                                    throws IOException
  {
    return run(resolverPath,
               defaultPackage,
               null,
               generateImported,
               generateDataTemplates,
               version,
               deprecatedByVersion,
               targetDirectoryPath,
               sources);
  }
@Test
  public void testLowercasePathForGeneratedFileDoesNotEffectTargetDirectory() throws IOException
  {
    if (!isFileSystemCaseSensitive) {
        // If system is case insensitive, then this test is a NOP.
        return;
    }

    // Given: Path with upper case letters as part of the target directory's path.
    final File root = ExporterTestUtils.createTmpDir();
    final String pathWithUpperCase = "mainGenerated";
    final String tmpPath = root.getPath() + FS + pathWithUpperCase;
    final File tmpDir = new File(tmpPath);
    tmpDir.mkdir();

    // Given: spec files.
    final String pegasusDir = moduleDir + FS + RESOURCES_DIR + FS + "pegasus";
    final String restspec = "arrayDuplicateB.namespace.restspec.json";
    final String file1 = moduleDir + FS + RESOURCES_DIR + FS + "idls" + FS + restspec;

    // When: Generate the files defined by spec.
    GeneratorResult r = RestRequestBuilderGenerator.run(pegasusDir,
            null,
            moduleDir,
            true,
            false,
            RestliVersion.RESTLI_2_0_0,
            null,
            tmpPath,
            new String[] { file1 },
            true);

    // Then: Validate generated files are created in the path without modifying the root path's case.
    Assert.assertTrue(r.getModifiedFiles().size() > 0);
    for (File f : r.getModifiedFiles()) {
      Assert.assertTrue(f.getCanonicalPath().contains(pathWithUpperCase));
      Assert.assertTrue(f.getAbsolutePath().contains(pathWithUpperCase));
    }

    // Clean up.
    ExporterTestUtils.rmdir(root);
  }