public static Set<String> extractUniquePrefixes(final Iterator<String> iterator, final String delimiter) {
        Set<String> uniquePrefixes = new HashSet<>();
        try{
            iterator.forEachRemaining(element -> {
                String prefix = element.substring(0, element.indexOf(delimiter));
                uniquePrefixes.add(prefix);
            });
            return uniquePrefixes;
        }catch (IndexOutOfBoundsException e){
            throw new ConfigParseException(String.format("Unable to extract prefix with delimiter: %s", delimiter), e);
        }
    }
@Test
    public void testExtractUniquePrefixes() {
        Iterator<String> iterator = List.of("backendA.circuitBreaker.test1", "backendA.circuitBreaker.test2", "backendB.circuitBreaker.test3").iterator();

        Set<String> prefixes = StringParseUtil.extractUniquePrefixes(iterator, ".");

        Assertions.assertThat(prefixes).containsExactlyInAnyOrder("backendA", "backendB");
    }