@Test
  public void testSplitAggregatesResponses() throws Exception {
    String[] array = new String[] {"one", "two", "three"};

    MockEndpoint mockOut = getMockEndpoint("mock:out");
    mockOut.expectedMessageCount(1);

    template.sendBody("direct:in", array);

    assertMockEndpointsSatisfied();
    Exchange exchange = mockOut.getReceivedExchanges().get(0);
    @SuppressWarnings("unchecked")
    Set<String> backendResponses =
        Collections.checkedSet(exchange.getIn().getBody(Set.class), String.class);
    assertTrue(
        backendResponses.containsAll(
            Arrays.asList("Processed: one", "Processed: two", "Processed: three")));
  }