@Test
void duplicateVariable() {

    assertThatThrownBy(() -> new PathPatternValidator("/:name/path/:name", true).validate())
            .isInstanceOf(Error.class)
            .hasMessageContaining("duplicate");
}