@Override
    public boolean match(final String rule) {
        return rule.matches("^en\\|\\d+-\\d+$");
    }
@Test
    public void testMatch() {
        assertTrue(generator.match("en|10-12"));
        assertFalse(generator.match("en"));
        assertFalse(generator.match("en|"));
        assertFalse(generator.match("en|10.1-12.1"));
        assertFalse(generator.match("en|10"));
        assertFalse(generator.match("en|-10"));
    }