@Test
public void labelsMustNotAppearInQueryString() {

    Throwable thrown = Assertions.assertThrows(InvalidUriPatternException.class, () -> {
        UriPattern.parse("/baz?bam={boozled}");
    });
    assertThat(thrown.getMessage(), containsString("URI labels must not appear in the query string"));
}