@Test(expected = IllegalArgumentException.class)
public void pathTemplateCreateShouldFailIfTemplateNameIsEmptyWithValidationRegex() throws Exception {

    try {
        RegexPathTemplate.create("http://localhost/{:[a-z]}");
    } catch (Exception e) {
        assertEquals("Template name '' doesn't match the expected format: ^\\w[-\\w\\.]+$", e.getMessage());
        throw e;
    }
}