static List<String> splitText(String toSplit, Pattern pattern) {
        return pattern.splitAsStream(toSplit)
                .map(trm -> trm.replaceAll("[^a-zA-Z0-9 ]", ""))
                .filter(trm -> !trm.isEmpty())
                .collect(Collectors.toList());
    }
@Test
    void splitText() {
        final Pattern unwantedPattern = Pattern.compile("[^a-zA-Z0-9 ]");
        final Pattern wantedPattern = Pattern.compile("[a-zA-Z0-9]");
        Pattern pattern = Pattern.compile("\\s+");
        List<String> retrieved = KiePMMLTextIndex.splitText(TEXT_0, pattern);
        assertThat(retrieved).hasSize(25);
        retrieved.forEach(txt -> {
            assertThat(unwantedPattern.matcher(txt).find()).isFalse();
            assertThat(wantedPattern.matcher(txt).find()).isTrue();
        });
        pattern = Pattern.compile("[\\s\\-]");
        retrieved = KiePMMLTextIndex.splitText(TEXT_0, pattern);
        assertThat(retrieved).hasSize(26);
        retrieved.forEach(txt -> {
            assertThat(unwantedPattern.matcher(txt).find()).isFalse();
            assertThat(wantedPattern.matcher(txt).find()).isTrue();
        });
    }