// verify
List expectedSequenceOfEvents = Arrays.asList(new String[] {
"startTest", "shouldDoSomething", "endTest",
"startTest", "shouldDoSomethingElse", "endTest"
});
Ensure.that(testResult.wasSuccessful());
for ( Iterator i = expectedSequenceOfEvents.iterator(); i.hasNext(); ){
String event = (String)i.next();
ensureThat(event, isContainedIn(sequenceOfEvents));
}
}