@Test
public void literalsMustNotContainAdjacentLabels() {

    Throwable thrown = Assertions.assertThrows(InvalidPatternException.class, () -> {
        EndpointTrait.builder()
                .hostPrefix("foo-{baz}{bar}")
                .build();
    });
    assertThat(thrown.getMessage(), containsString("Host labels must not be adjacent"));
}