package junitparams;

import static junitparams.JUnitParamsRunner.*;
import static org.junit.Assert.assertEquals;

import java.util.*;

import org.junit.*;
import org.junit.runner.*;

@RunWith(JUnitParamsRunner.class)
public class IteratorMethodTest {
	private static boolean firstCalled = false;
	
    @Test
    @Parameters
    public void shouldHandleIteratorsWithObject(String a) {
    	assertEquals(1, a.length());
    	if(a.equals("a")) firstCalled = true;
    	else assertEquals(firstCalled, true);
    }

    public Iterator<Object> parametersForShouldHandleIteratorsWithObject() {
        ArrayList<Object> params = new ArrayList<Object>();
        params.add("a");
        params.add("b");
        return params.iterator();
    }
	
    @Test
    @Parameters
    public void shouldHandleIteratorsWithObjectArray(String a) {
    	assertEquals(1, a.length());
    	if(a.equals("a")) firstCalled = true;
    	else assertEquals(firstCalled, true);
    }

    public Iterator<Object[]> parametersForShouldHandleIteratorsWithObjectArray() {
        ArrayList<Object[]> params = new ArrayList<Object[]>();
        params.add($("a"));
        params.add($("b"));
        return params.iterator();
    }
    
}
Add tests