@Test
public void restrictsGreedyLabels() {

    Throwable thrown = Assertions.assertThrows(InvalidPatternException.class, () -> {
        String target = "/foo/{baz+}";
        SmithyPattern.builder()
                .allowsGreedyLabels(false)
                .segments(parser(target))
                .pattern(target)
                .build();
    });
    assertThat(thrown.getMessage(), containsString("Pattern must not contain a greedy label"));
}