public GeneratorResult export(String apiName,
                                String[] classpath,
                                String[] sourcePaths,
                                String[] resourcePackages,
                                String outdir)
    throws IOException
  {
    return export(apiName, classpath, sourcePaths, resourcePackages, null, outdir);
  }
@Test(dataProvider = "resourceModelData")
  @SuppressWarnings("Duplicates")
  public void testExportResourceModel(String apiName, String[] resourcePackages, String idlPath, String[] expectedFiles) throws Exception
  {
    RestLiResourceModelExporter exporter = new RestLiResourceModelExporter();

    Assert.assertEquals(outdir.list().length, 0);
    GeneratorResult result = exporter.export(apiName,
        null,
        new String[] {moduleDir + FS + TEST_DIR},
        resourcePackages,
        null,
        outdir.getAbsolutePath());

    Assert.assertEquals(outdir.list().length, expectedFiles.length);
    Assert.assertEquals(result.getModifiedFiles().size(), expectedFiles.length);
    Assert.assertEquals(result.getTargetFiles().size(), expectedFiles.length);

    for (String file : expectedFiles)
    {
      String actualFile = outdir + FS + file;
      String expectedFile = moduleDir + FS + idlPath + FS + file;

      ExporterTestUtils.compareFiles(actualFile, expectedFile);
      Assert.assertTrue(result.getModifiedFiles().contains(new File(actualFile)));
      Assert.assertTrue(result.getTargetFiles().contains(new File(actualFile)));
    }
  }