public void setConfiguration(InfinispanEmbeddedConfiguration configuration) {
        this.configuration = configuration;
    }
@Test
    public void checkAggregationFromOneRoute() throws Exception {
        InfinispanEmbeddedConfiguration configuration = new InfinispanEmbeddedConfiguration();
        configuration.setCacheContainer(cacheContainer);

        InfinispanEmbeddedAggregationRepository repo = new InfinispanEmbeddedAggregationRepository(getCacheName());
        repo.setConfiguration(configuration);

        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() {
                from("direct:start")
                        .aggregate(header(CORRELATOR_HEADER))
                        .aggregationRepository(repo)
                        .aggregationStrategy((oldExchange, newExchange) -> {
                            if (oldExchange == null) {
                                return newExchange;
                            } else {
                                Integer n = newExchange.getIn().getBody(Integer.class);
                                Integer o = oldExchange.getIn().getBody(Integer.class);
                                Integer v = (o == null ? 0 : o) + (n == null ? 0 : n);
                                oldExchange.getIn().setBody(v, Integer.class);
                                return oldExchange;
                            }
                        })
                        .completionSize(COMPLETION_SIZE)
                        .to("mock:result");
            }
        });

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(2);
        mock.expectedBodiesReceived(1 + 3 + 4 + 5, 6 + 7 + 20 + 21);

        template.sendBodyAndHeader("direct:start", 1, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 3, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 4, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 5, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 6, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 7, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 20, CORRELATOR_HEADER, CORRELATOR_HEADER);
        template.sendBodyAndHeader("direct:start", 21, CORRELATOR_HEADER, CORRELATOR_HEADER);

        mock.assertIsSatisfied();
    }