Set expected = new HashSet();
expected.add("twenty_one_1");
expected.add("twenty_two_1");
expected.add("twenty_three_1");
for (Iterator i = currentStates.iterator(); i.hasNext(); ) {
TransitionTarget tt = (TransitionTarget) i.next();
if (!expected.remove(tt.getId())) {
fail("'" + tt.getId()
+ "' is not an expected current state ID");
}
}
currentStates = SCXMLTestHelper.fireEvent(exec, "bar");
assertEquals(1, currentStates.size());