Submitting an ordered collection of events
You can submit a collection of events by creating a Java List of the events and using the test driver submitEvents(Iterator<Event> events) method. You can define and change the order in which the events are submitted to analyze the behavior of your solution.
About this task
To test an event collection, create a test client project. You can create an event collection by using any Java collection class that contains an object of the type Event, such as List<Event> or Set<Event>. Submit the event collection by passing an event iterator to the submitEvents() method.
When you submit an event collection, the events are processed in the order in which they are returned by the iterator. The iterator returns the event collections in an order that depends on your collection implementation. Consult the Javadoc for the implementation that you use for an accurate description of the iteration order.
The TestDriver class is the main entry point for testing a solution.
If a failure occurs during the event submission process, the process stops and a MultipleEventSubmissionException exception is thrown. The exception includes the cause of the failure and the results for any successful event submissions that occurred before the failure.