0
MockEndpointのボディを取得するにはどうすればよいですか?MockEndpointのボディを取得
@EndpointInject(uri = "mock:direct:end")
protected MockEndpoint endEndpoint;
endEndpoint.setExpectedMessageCount(1);
String test = (String)endEndpoint.getExchanges().get(0).getIn().getBody();
endEndpoint.getExchanges()は空のリストを返し、ArrayIndexOutOfBoundsExceptionをスローします。ただし、endEndpointは1メッセージを取得します。