@Test
  public void aggregatesMessagesByCorrelationKey() throws Exception {
    mockAggregated.expectedHeaderValuesReceivedInAnyOrder(
        "invoiceItemTotal", BigDecimal.valueOf(5), BigDecimal.valueOf(4));
    mockAggregated.expectedMessageCount(2);

    start.sendBodyAndHeaders(
        null, toHeadersMap("invoiceId", "invoiceOne", "invoiceItemTotal", BigDecimal.valueOf(2)));
    start.sendBodyAndHeaders(
        null, toHeadersMap("invoiceId", "invoiceTwo", "invoiceItemTotal", BigDecimal.valueOf(4)));
    start.sendBodyAndHeaders(
        null, toHeadersMap("invoiceId", "invoiceOne", "invoiceItemTotal", BigDecimal.valueOf(3)));
    assertMockEndpointsSatisfied();
  }