### Question:
AlgorithmExecution { protected static List<ColumnIdentifier> extractColumnNames(List<Input> inputs) throws AlgorithmConfigurationException, InputGenerationException{ List<RelationalInputGenerator> inputGenerators = new ArrayList<>(); for (Input input : inputs) { if (input instanceof FileInput) { File currFile = new File(input.getName()); if (currFile.isFile()) { inputGenerators.add(InputToGeneratorConverter.convertInput(input)); } else if (currFile.isDirectory()) { File[] filesInDirectory = currFile.listFiles(new FilenameFilter() { @Override public boolean accept(File file, String name) { for (String fileEnding : Constants.ACCEPTED_FILE_ENDINGS_ARRAY) { if (name.endsWith(fileEnding)) { return true; } } return false; } }); for (File file : filesInDirectory) { try { inputGenerators.add(new DefaultFileInputGenerator(file, InputToGeneratorConverter.convertInputToSetting((FileInput) input))); } catch (FileNotFoundException e) { e.printStackTrace(); } } } } else { RelationalInputGenerator relInpGen = InputToGeneratorConverter.convertInput(input); if (relInpGen != null) { inputGenerators.add(relInpGen); } } } if (inputGenerators.isEmpty()) { return null; } List<ColumnIdentifier> columnNames = new ArrayList<>(); for (RelationalInputGenerator inputGenerator : inputGenerators) { RelationalInput input = inputGenerator.generateNewCopy(); String tableName = input.relationName(); for (String columnName : input.columnNames()) { columnNames.add(new ColumnIdentifier(tableName, columnName)); } } return columnNames; }  static List<ConfigurationValue> parseConfigurationValues(List<String> parameterValuesJson); static List<Input> parseInputs(List<String> inputsJson); static void main(String args[]);  }### Answer:
@Test public void testExtractColumnNames() throws AlgorithmConfigurationException, InputGenerationException, FileNotFoundException, URISyntaxException { List<Input> inputs = new ArrayList<>(); URLClassLoader sysLoader = (URLClassLoader)Thread.currentThread().getContextClassLoader(); String url = sysLoader.getResource(Constants.INPUTDATA_RESOURCE_NAME).toString(); URI uri = new URI(url); String pathToCsvFolder = uri.getPath(); inputs.add(new FileInput(pathToCsvFolder + Constants.FILE_SEPARATOR + "inputC.tsv").setSeparator("\\t")); List<ColumnIdentifier> expectedColumnNames = new ArrayList<>(); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "000")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "001")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "002")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "003")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "004")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "005")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "006")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "007")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "008")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "009")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "010")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "011")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "012")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "013")); expectedColumnNames.add(new ColumnIdentifier("inputC.tsv", "014")); List<ColumnIdentifier> actualColumnNames = AlgorithmExecution.extractColumnNames(inputs); assertEquals(expectedColumnNames, actualColumnNames); }