@Test
public void acceptJsonArrayStringWithNonStringItems() {

    final DittoHeaderDefinition headerDefinition = DittoHeaderDefinition.REQUESTED_ACKS;
    final JsonArray invalidJsonArray = JsonArray.newBuilder()
            .add("foo")
            .add(42)
            .add(true)
            .build();
    final String invalidJsonArrayString = invalidJsonArray.toString();
    final JsonArrayValueValidator underTest = JsonArrayValueValidator.getInstance();
    assertThatExceptionOfType(DittoHeaderInvalidException.class)
            .isThrownBy(() -> underTest.accept(headerDefinition, invalidJsonArrayString))
            .withMessageContaining(headerDefinition.getKey())
            .withMessageEndingWith("contained non-string values!")
            .withNoCause();
}