### Question:
SlottedCombinationIterator implements Iterator<int[]> { @Override public int[] next() { if (this.hasNext()) { canAdvance = true; return Arrays.copyOf(counts, counts.length); } throw new NoSuchElementException(); } SlottedCombinationIterator(int[] initialState);  SlottedCombinationIterator(int[] initialState, int[] maxCounts);  SlottedCombinationIterator(int numSlots, int numItems);  SlottedCombinationIterator(int numSlots, int numItems, int[] maxCounts); @Override boolean hasNext(); @Override int[] next(); @Override void remove();  }### Answer:
@Test(expected = NoSuchElementException.class) public void testThrowsExceptionAtEndOfIter() { Iterator<int[]> iter = new SlottedCombinationIterator(1, 1); iter.next(); iter.next(); }