@Override
    public ConfigDef config() {
        return CONFIG_DEF;
    }
@Test
    public void testConfig() {
        TopicNameMatches<SourceRecord> predicate = new TopicNameMatches<>();
        predicate.config().validate(Collections.singletonMap("pattern", "my-prefix-.*"));

        List<ConfigValue> configs = predicate.config().validate(Collections.singletonMap("pattern", "*"));
        List<String> errorMsgs = configs.get(0).errorMessages();
        assertEquals(1, errorMsgs.size());
        assertTrue(errorMsgs.get(0).contains("Invalid regex"));
    }