@Test
public void testThingPlaceholder() {

    assertThatExceptionOfType(NullPointerException.class).isThrownBy(
            () -> thingPlaceholder.resolve(THING_ID, null));
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(
            () -> thingPlaceholder.resolve(THING_ID, ""));
    assertThatExceptionOfType(UnresolvedPlaceholderException.class).isThrownBy(
            () -> PlaceholderFilter.apply("{{ header:unknown }}", THING_ID, thingPlaceholder));
    assertThatExceptionOfType(UnresolvedPlaceholderException.class).isThrownBy(
            () -> PlaceholderFilter.apply("{{ {{  thing:name  }} }}", THING_ID, thingPlaceholder));
    assertThat(PlaceholderFilter.apply(THING_ID.toString(), THING_ID, thingPlaceholder))
            .isEqualTo(THING_ID.toString());
    assertThat(PlaceholderFilter.apply("prefix:{{ thing:namespace }}:{{ thing:name }}:suffix", THING_ID,
            thingPlaceholder)).isEqualTo("prefix:eclipse:ditto:suffix");
    assertThat(PlaceholderFilter.apply("testTargetAmqpCon4_{{thing:namespace}}:{{thing:name}}", THING_ID,
            thingPlaceholder))
            .isEqualTo("testTargetAmqpCon4_eclipse:ditto");
    assertThat(PlaceholderFilter.apply("testTargetAmqpCon4_{{thing:id}}", THING_ID, thingPlaceholder)).isEqualTo(
            "testTargetAmqpCon4_eclipse:ditto");
}