The `getReceivedExchanges` method in the Java class `org.apache.camel.component.mock.MockEndpoint` is used to retrieve the list of received message exchanges by a mock endpoint.
This method returns a list of `Exchange` objects, which represent the actual message exchanges received by the mock endpoint during testing or simulation. The exchanges can be further analyzed or inspected to verify the expected behavior of the tested components or routes.
By using this method, developers can perform assertions on the received exchanges, such as verifying the number of exchanges, their content, headers, or properties, and comparing them against expected values. This facilitates unit testing, integration testing, or general testing of Camel-based applications, enabling developers to ensure correct message routing and processing.
Java MockEndpoint.getReceivedExchanges - 29 examples found. These are the top rated real world Java examples of org.apache.camel.component.mock.MockEndpoint.getReceivedExchanges extracted from open source projects. You can rate examples to help us improve the quality of examples.