@Test
    void testSelectorPattern() {

        String pattern = HasCapacitySelectorFactory.VOLUME_SELECTOR_PATTERN;
        pattern = pattern.replaceAll("^\\^\\(", "")
                .replaceAll("\\)\\$$", "");
        final Set<String> selectorNamesInPattern = new HashSet<>(Arrays.asList(pattern.split("\\|")));

        final Set<String> selectorNames = HasCapacitySelectorFactory.getSelectorNames();

        Assertions.assertThat(selectorNamesInPattern)
                .containsExactlyInAnyOrderElementsOf(selectorNames);
    }
Make sure the pattern for validating the selector names matches the names of the selectors.
This is because we can't build the validation pattern dynamically so this protects against a
dev changing one without the other.
stroom-util/src/test/java/stroom/util/io/capacity/TestHasCapacitySelectorFactory.java