static Map<Boolean, List<String>> partitionSupport(
        String[] supportedByJVM,
        String[] enabledByJVM,
        String[] excludedByConfig,
        String[] includedByConfig
    ) {
        final List<Pattern> enabled = Arrays.stream(enabledByJVM).map(Pattern::compile).collect(Collectors.toList());
        final List<Pattern> disabled = Arrays.stream(excludedByConfig).map(Pattern::compile).collect(Collectors.toList());
        final List<Pattern> included = Arrays.stream(includedByConfig).map(Pattern::compile).collect(Collectors.toList());

        return Arrays.stream(supportedByJVM)
            .sorted(Comparator.naturalOrder())
            .collect(Collectors.partitioningBy(x ->
                disabled.stream().noneMatch(pat -> pat.matcher(x).matches()) &&
                    enabled.stream().anyMatch(pat -> pat.matcher(x).matches()) &&
                    (included.isEmpty() || included.stream().anyMatch(pat -> pat.matcher(x).matches()))
            ));

    }
@Test
    void partitionSupportInclude() {
        final String[] supported = {"SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"};
        final String[] enabled = {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"};
        final String[] exclude = {"SSL*"};
        final String[] include = {"TLSv1.2|SSLv2Hello"};
        final Map<Boolean, List<String>> partition =
                HttpsConnectorFactory.partitionSupport(supported, enabled, exclude, include);

        assertThat(partition)
                .containsOnly(
                        entry(true, Collections.singletonList("TLSv1.2")),
                        entry(false, Arrays.asList("SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.1"))
                );
    }