public Map<String, String> parse(String body) {
        final ImmutableMap.Builder<String, String> newLookupBuilder = ImmutableMap.builder();

        final String[] lines = body.split(lineSeparator);

        for (String line : lines) {
            if (line.startsWith(this.ignorechar)) {
                continue;
            }
            final String[] values = line.split(this.splitPattern);
            if (values.length <= Math.max(keyColumn, keyOnly ? 0 : valueColumn)) {
                continue;
            }
            final String key = this.caseInsensitive ? values[keyColumn].toLowerCase(Locale.ENGLISH) : values[keyColumn];
            final String value = this.keyOnly ? "" : values[valueColumn].trim();
            final String finalKey = Strings.isNullOrEmpty(quoteChar) ? key.trim() : key.trim().replaceAll("^" + quoteChar + "|" + quoteChar + "$", "");
            final String finalValue = Strings.isNullOrEmpty(quoteChar) ? value.trim() : value.trim().replaceAll("^" + quoteChar + "|" + quoteChar + "$", "");
            newLookupBuilder.put(finalKey, finalValue);
        }

        return newLookupBuilder.build();
    }
@Test
    public void parseSimpleFile() throws Exception {
        final String input = "# Sample file for testing\n" +
                "foo:23\n" +
                "bar:42\n" +
                "baz:17";
        final DSVParser dsvParser = new DSVParser("#", "\n", ":", "", false, false, 0, Optional.of(1));

        final Map<String, String> result = dsvParser.parse(input);

        assertThat(result)
                .isNotNull()
                .isNotEmpty()
                .hasSize(3)
                .containsExactly(
                        new AbstractMap.SimpleEntry<>("foo", "23"),
                        new AbstractMap.SimpleEntry<>("bar", "42"),
                        new AbstractMap.SimpleEntry<>("baz", "17")
                );
    }