@Override
    @NonNull
    public Predicate<E> convert(SelectorCriteria criteria) {
        // current we only support name field.
        return ext -> {
            if ("name".equals(criteria.key())) {
                var name = ext.getMetadata().getName();
                if (name == null) {
                    return false;
                }
                switch (criteria.operator()) {
                    case Equals, IN -> {
                        return criteria.values().contains(name);
                    }
                    case NotEquals -> {
                        return !criteria.values().contains(name);
                    }
                    default -> {
                        return false;
                    }
                }
            }
            return false;
        };
    }
@Test
    void shouldConvertNameNotEqualsCorrectly() {
        var criteria = new SelectorCriteria("name", Operator.NotEquals, Set.of("value1", "value2"));
        var predicate = converter.convert(criteria);
        assertNotNull(predicate);

        var fake = new FakeExtension();
        var metadata = new Metadata();
        fake.setMetadata(metadata);
        assertFalse(predicate.test(fake));

        metadata.setName("not-contain-value");
        assertTrue(predicate.test(fake));

        metadata.setName("value1");
        assertFalse(predicate.test(fake));

        metadata.setName("value2");
        assertFalse(predicate.test(fake));
    }