### Question:
ImportableColumnController { public void detectNonImportableColumns(CSVParseParameters parameters, PreferencesRegistry registry) { List<String> metaColumns = new ArrayList<String>(Arrays.asList(MetaColumn.COLOR, MetaColumn.HILIGHT, MetaColumn.INDEX, MetaColumn.LOB_VISIBLE, MetaColumn.MGRS_DERIVED, MetaColumn.SELECTED, MetaColumn.VISIBLE)); if (parameters.getColumnNames() != null) { Map<String, Integer> upperCasedColumnNames = New.map(); int index = 0; for (String columnName : parameters.getColumnNames()) { upperCasedColumnNames.put(columnName.toUpperCase(), Integer.valueOf(index)); index++; } for (String columnName : parameters.getColumnNames()) { String key = ourKeyPrefix + columnName.toLowerCase(); List<String> columnsToNotImport = CSVColumnPrefsUtil.getCustomKeys(registry, key); List<String> currentParams = new ArrayList<String>(parameters.getColumnNames()); List<String> newParams = new ArrayList<String>(); currentParams.forEach(e -> { if (metaColumns.contains(e)) { e = e + "_user"; } newParams.add(e); }); parameters.setColumnNames(newParams); if (columnsToNotImport != null) { for (String columns : columnsToNotImport) { String upperCaseColumn = columns.toUpperCase(); if (upperCasedColumnNames.containsKey(upperCaseColumn)) { parameters.getColumnsToIgnore().add(upperCasedColumnNames.get(upperCaseColumn)); } } } } } }  void detectNonImportableColumns(CSVParseParameters parameters, PreferencesRegistry registry);  }### Answer:
@Test public void testDetectNonImportableColumns() { EasyMockSupport support = new EasyMockSupport(); PreferencesRegistry registry = createRegistry(support); CSVParseParameters parameters = new CSVParseParameters(); parameters.setColumnNames(New.list("Column1", "Column2", "Column3", "Column4", "Column5")); support.replayAll(); ImportableColumnController controller = new ImportableColumnController(); controller.detectNonImportableColumns(parameters, registry); assertTrue(parameters.getColumnsToIgnore().contains(1)); assertTrue(parameters.getColumnsToIgnore().contains(2)); support.verifyAll(); }