@Test
public void invalidJsonArrayStringValueNoStringItem() {

    Mockito.when(headerDefinition.getJavaType()).thenReturn(JsonArray.class);
    final JsonArray jsonArray = JsonFactory.newArrayBuilder()
            .add("foo")
            .add(2)
            .add("baz")
            .build();
    final String value = jsonArray.toString();
    assertThatExceptionOfType(DittoHeaderInvalidException.class)
            .isThrownBy(() -> underTest.accept(headerDefinition, value))
            .withMessage("JSON array for <%s> contained non-string values!", HEADER_KEY)
            .withNoCause();
}