<BUG>Exchange exchange = mockOut.getReceivedExchanges().get(0);Set<String> backendResponses = exchange.getIn().getBody(Set.class);assertTrue(backendResponses.containsAll(Arrays.asList("Processed: one","Processed: two","Processed: three")));</BUG><CONTEXT>String[] array = new String[]{"one", "two", "three"};MockEndpoint mockOut = getMockEndpoint("mock:out");mockOut.expectedMessageCount(1);template.sendBody("direct:in", array);assertMockEndpointsSatisfied();<extra_id_0>}</CONTEXT>
@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")));