@Test
public void testHeadersPlaceholder() {

    assertThatExceptionOfType(NullPointerException.class).isThrownBy(
            () -> headersPlaceholder.resolve(HEADERS, null));
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(
            () -> headersPlaceholder.resolve(HEADERS, ""));
    assertThatExceptionOfType(UnresolvedPlaceholderException.class).isThrownBy(
            () -> PlaceholderFilter.apply("{{ header:unknown }}", HEADERS, headersPlaceholder));
    assertThatExceptionOfType(UnresolvedPlaceholderException.class).isThrownBy(
            () -> PlaceholderFilter.apply("{{ {{  header:device-id  }} }}", HEADERS, headersPlaceholder));
    assertThat(PlaceholderFilter.apply(THING_ID.toString(), HEADERS, headersPlaceholder))
            .isEqualTo(THING_ID.toString());
    assertThat(
            PlaceholderFilter.apply("eclipse:ditto:{{ header:device-id }}", HEADERS, headersPlaceholder)).isEqualTo(
            "eclipse:ditto:device-12345");
}