outputElementMock1.expects.getName().returns("output element 1").any();
outputElementMock2.expects.getName().returns("output element 2").any();
// Create an action which fakes the iteration of two elements.
MethodAction action = new OutputStyledElementsIterateMethodAction() {
public void iterate(OutputStyledElementIteratee iteratee) {
assertEquals(IterationAction.CONTINUE,
iteratee.next(outputElementMock1));
assertEquals(IterationAction.CONTINUE,
iteratee.next(outputElementMock2));