@Test
public void testToList() {

  List<Integer> i1 = toList(java.util.Collections.<Integer>emptyList().iterator());
  assertTrue(i1.isEmpty());
  List<Integer> i2 = toList(list(1, 2, 3).iterator());
  assertEquals(3, i2.size());
  List<Object> i3 = toList(list("1", 2, new Object()).iterator());
  assertEquals(3, i3.size());
}