in aggregate-dist/src/main/java/org/apache/camel/example/Application.java [180:194]
private boolean completionPredicate(Exchange exchange) {
boolean isComplete = false;
final String body = exchange.getIn().getBody(String.class);
if (body != null && !body.isEmpty()) {
String[] a1 = body.split("\\.");
String[] a2 = expectedResult.split("\\.");
if (a1.length == a2.length) {
Arrays.sort(a1);
Arrays.sort(a2);
isComplete = Arrays.equals(a1, a2);
}
}
LOG.debug("Complete? {}", isComplete);
return isComplete;
}