@Test
public void labelsMustStartWithSlash() {

    Throwable thrown = Assertions.assertThrows(InvalidUriPatternException.class, () -> UriPattern.parse("foo"));
    assertThat(thrown.getMessage(), containsString("URI pattern must start with '/'"));
}