public static Collection<Object[]> asParameters() {
    List<Object[]> parameters = new ArrayList<Object[]>();

    // Add test parameters from official storage formats registered with Hive via
    // StorageFormatDescriptor.
    final Configuration conf = new Configuration();
    for (StorageFormatDescriptor descriptor : ServiceLoader.load(StorageFormatDescriptor.class)) {
      String serdeClass = descriptor.getSerde();
      if (serdeClass == null) {
        if (descriptor instanceof RCFileStorageFormatDescriptor) {
          serdeClass = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_DEFAULT_RCFILE_SERDE);
        } else {
          serdeClass = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_DEFAULT_SERDE);
        }
      }

      String[] names = new String[descriptor.getNames().size()];
      names = descriptor.getNames().toArray(names);
      Object[] arguments = createTestArguments(names[0], serdeClass, descriptor.getInputFormat(),
          descriptor.getOutputFormat());
      parameters.add(arguments);
    }

    // Add test parameters from storage formats specified in ADDITIONAL_STORAGE_FORMATS table.
    for (int i = 0; i < ADDITIONAL_STORAGE_FORMATS.length; i++) {
      String serdeClass = (String) ADDITIONAL_STORAGE_FORMATS[i][1];
      String name = (String) ADDITIONAL_STORAGE_FORMATS[i][0];
      String inputFormatClass = (String) ADDITIONAL_STORAGE_FORMATS[i][2];
      String outputFormatClass = (String) ADDITIONAL_STORAGE_FORMATS[i][3];
      assertTrue("InputFormat for storage format not set", inputFormatClass != null);
      assertTrue("OutputFormat for storage format not set", outputFormatClass != null);
      Object[] arguments = createTestArguments(name, serdeClass, inputFormatClass,
          outputFormatClass);
      parameters.add(arguments);
    }

    return parameters;
  }
Generates a collection of parameters that can be used as paramters for a JUnit test fixture.
Each parameter represents one storage format that the fixture will run against. The list
includes both native Hive storage formats as well as those enumerated in the
ADDITIONAL_STORAGE_FORMATS table.

@return List of storage format as a Collection of Object arrays, each containing (in order):
        Storage format name, SerDe class name, InputFormat class name, OutputFormat class name.
        This list is used as the parameters to JUnit parameterized tests.
ql/src/test/org/apache/hadoop/hive/ql/io/StorageFormats.java