@Override
    public boolean match(final String rule) {
        boolean matches = rule.matches("^list\\|\\[.+]$");
        if (matches) {
            String candidateData = rule.substring(6, rule.length() - 1);
            return !candidateData.matches("^\\s+$");
        }
        return false;
    }
@Test
    public void match() {
        assertTrue(generator.match("list|[shen\\,yu,gate\\,way]"));
        assertTrue(generator.match("list|[shenyu,gateway]"));
        assertFalse(generator.match("list|[shenyu,gateway"));
        assertFalse(generator.match("list|[]"));
        assertFalse(generator.match("list|[ ]"));

    }