### Question:
PermutationIterator implements Iterator<List<T>> { @Override public boolean hasNext() { return next != null; } PermutationIterator(List<T> list); @Override boolean hasNext(); @Override List<T> next(); @Override void remove();  }### Answer:
@Test public void lessSimple() { List<String> list = new ArrayList<String>(); list.add("Hasan"); PermutationIterator<String> pi = new PermutationIterator<String>(list); Assert.assertTrue(pi.hasNext()); }
@Test public void simple() { List<String> list = new ArrayList<String>(); PermutationIterator<String> pi = new PermutationIterator<String>(list); Assert.assertFalse(pi.hasNext()); }