@Override
    @Nullable
    public SelectorCriteria convert(@Nullable String selector) {
        return Arrays.stream(Operator.values())
            .sorted(Comparator.comparing(Operator::getOrder))
            .map(operator -> {
                log.debug("Resolving selector: {} with operator: {}", selector, operator);
                return operator.convert(selector);
            })
            .filter(Objects::nonNull)
            .findFirst()
            .orElse(null);
    }
@Test
    void shouldConvertCorrectly() {
        record TestCase(String selector, SelectorCriteria expected) {
        }

        List.of(
            new TestCase("", null),
            new TestCase("name=value",
                new SelectorCriteria("name", Equals, Set.of("value"))),
            new TestCase("name!=value",
                new SelectorCriteria("name", Operator.NotEquals, Set.of("value"))),
            new TestCase("name",
                new SelectorCriteria("name", Operator.Exist, Set.of())),
            new TestCase("!name",
                new SelectorCriteria("name", Operator.NotExist, Set.of())),
            new TestCase("name",
                new SelectorCriteria("name", Operator.Exist, Set.of())),
            new TestCase("name!=",
                new SelectorCriteria("name!=", Operator.Exist, Set.of())),
            new TestCase("==",
                new SelectorCriteria("==", Operator.Exist, Set.of()))
        ).forEach(testCase -> {
            log.debug("Testing: {}", testCase);
            assertEquals(testCase.expected, converter.convert(testCase.selector));
        });
    }