### Question:
Spreadsheet { public String convertHeaderName(String str) { String name; if (str.contains("@")) { name = StringUtils.substringBefore(str, "@"); } else { name = str; } if (name.contains("[")) { name = StringUtils.substringBefore(name, "["); } if (enableHeaderNameConversion && isHeaderCaseInsensitive(name)) { name = String.valueOf(name).toLowerCase().replaceAll("[^0-9a-zA-Z:\\-]+", "_"); } return name; } Spreadsheet(boolean convertHeaderNames, String... headerArray);  Spreadsheet(boolean convertHeaderNames, List<String> caseInsensitiveHeaders, String... headerArray);  Spreadsheet(boolean convertHeaderNames, InputStream file, String... required);  Spreadsheet(boolean convertHeaderNames, RequestParameter file, String... required);  Spreadsheet(InputStream file, String... required);  Spreadsheet(RequestParameter file, String... required);  Spreadsheet(RequestParameter file, List<String> caseInsensitiveHeaders, String... required); Spreadsheet buildSpreadsheet(); Spreadsheet buildSpreadsheet(Locale locale); String getFileName(); int getRowCount(); List<String> getHeaderRow(); List<Map<String, CompositeVariant>> getDataRowsAsCompositeVariants(); Long getRowNum(Map<String, CompositeVariant> row); List<String> getRequiredColumns(); String convertHeaderName(String str); static final String DEFAULT_DELIMITER; static final String ROW_NUMBER; }### Answer:
@Test public void testHeadersWithCaseInsensitivityList() { Spreadsheet spreadsheet = new Spreadsheet(true, CASE_INSENSITIVE_HEADERS); assertEquals("source", spreadsheet.convertHeaderName("SoUrCe")); assertEquals("rendition", spreadsheet.convertHeaderName("RenDiTion")); assertEquals("target", spreadsheet.convertHeaderName("TarGeT")); assertEquals("original", spreadsheet.convertHeaderName("OrIgInal")); assertEquals("camelCaseProperty", spreadsheet.convertHeaderName("camelCaseProperty")); }
@Test public void testHeadersWithoutCaseInsensitivityList() { Spreadsheet spreadsheet = new Spreadsheet(true); assertEquals("source", spreadsheet.convertHeaderName("SoUrCe")); assertEquals("rendition", spreadsheet.convertHeaderName("RenDiTion")); assertEquals("target", spreadsheet.convertHeaderName("TarGeT")); assertEquals("original", spreadsheet.convertHeaderName("OrIgInal")); assertEquals("test:camelcase", spreadsheet.convertHeaderName("test:camelCase")); }