@Override protected RouteBuilder[] createRouteBuilders() throws Exception { EbmsOutboundRouteBuilder routeBuilder = new EbmsOutboundRouteBuilder(); routeBuilder.setOutboundEbmsQueue("direct:testOutboundEbmsQueue"); routeBuilder.setEbmsResponseInbound(mockEbmsResponseInbound.getEndpointUri()); routeBuilder.setMessageUpdateEndpoint(mockUpdateMessageStore.getEndpointUri()); routeBuilder.setCpaRepository(new DummyCPARepository()); return new RouteBuilder[] { routeBuilder, new RouteBuilder() { @Override public void configure() throws Exception { from("direct:agreement1") .to(mockAgreement1.getEndpointUri()) .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(204)) .setBody(constant(null)) .routeId("mockAgreement1"); from("direct:agreement2") .to(mockAgreement2.getEndpointUri()) .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(200)) .setBody( constant( IOUtils.toString( new FileInputStream(fileFromClasspath("simple-as4-receipt.xml"))))) .routeId("mockAgreement2"); from(EventNotificationRouteBuilder.SEND_NOTIFICATION_ENDPOINT) .log(LoggingLevel.INFO, "mock event notification: ${headers}") .routeId("mockEventNotification"); } } }; }