import java.util.Arrays;
import java.util.Iterator;
public class Main {
public static void main(String[] args) {
User foo[] = { new User(1), new User(2), new User(3), new User(4)};
Iterable<User> userlist = Arrays.asList(foo);
Iterator userpool = userlist.iterator();
while(userpool.hasNext()){
Starter.startTestWithUser((User)userpool.next());
}
}
}
class User{
private int id;
public User(int id){ this.id = id; }
public int id(){ return this.id; }
}
class Starter{
public static void startTestWithUser(User user){
System.out.println("Creating Test for user "+user.id());
}
}