@Test public void fails_to_retrieve_next_element_for_empty_array() { ArrayIterator<String> iterator = new ArrayIterator<>(new String[0]); thrown.expect(NoSuchElementException.class); iterator.next(); }
@Test public void has_no_next_elements_for_empty_arrays() { ArrayIterator<String> iterator = new ArrayIterator<>(new String[0]); assertThat(iterator.hasNext()).isFalse(); }