@Test
public void filterJsonArrayValueBasedOnCommaSeparatedList() {

    final List<AcknowledgementRequest> acknowledgementRequests = Lists.list(
            AcknowledgementRequest.of(AcknowledgementLabel.of("foo")),
            AcknowledgementRequest.of(AcknowledgementLabel.of("bar")));
    final JsonArray acknowledgementRequestsJsonArray = acknowledgementRequests.stream()
            .map(AcknowledgementRequest::toString)
            .map(JsonValue::of)
            .collect(JsonCollectors.valuesToArray());
    final String expectedArrayValue = acknowledgementRequestsJsonArray.toString();
    final String commaSeparatedRequestedAcks = "foo,bar";
    final ReadJsonArrayHeadersFilter underTest = ReadJsonArrayHeadersFilter.getInstance(headerDefinitions);
    final String filteredValue = underTest.apply(HEADER_DEFINITION.getKey(), commaSeparatedRequestedAcks);
    assertThat(filteredValue).isEqualTo(expectedArrayValue);
}