// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java
// public static final String[] EMPTY_STRING_ARRAY = new String[]{};


import org.junit.jupiter.api.Test;
import java.util.NoSuchElementException;
import static com.github.jankroken.commandline.util.Constants.EMPTY_STRING_ARRAY;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.*;
package com.github.jankroken.commandline.util;




public class PeekIteratorTest {

    private static PeekIterator<String> createIterator(String[] args) {
        var ai = new ArrayIterator<>(args);
        return new PeekIterator<>(ai);
    }

    @Test
    public void testEmpty() {
        var ai = createIterator(EMPTY_STRING_ARRAY);
        assertFalse(ai.hasNext());
    }

    @Test
    public void testOneElement() {
        var oneElement = new String[]{"hello"};
        var ai = createIterator(oneElement);
        assertTrue(ai.hasNext());
        var hello = ai.next();
        assertEquals(hello, "hello");
        assertFalse(ai.hasNext());
    }

    @Test
    public void testTwoElements() {
        var elements = new String[]{"hello", "world"};
        var ai = createIterator(elements);
// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java
// public static final String[] EMPTY_STRING_ARRAY = new String[]{};


// Path: src/test/java/com/github/jankroken/commandline/util/PeekIteratorTest.java
import org.junit.jupiter.api.Test;
import java.util.NoSuchElementException;
import static com.github.jankroken.commandline.util.Constants.EMPTY_STRING_ARRAY;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.*;

package com.github.jankroken.commandline.util;




public class PeekIteratorTest {

    private static PeekIterator<String> createIterator(String[] args) {
        var ai = new ArrayIterator<>(args);
        return new PeekIterator<>(ai);
    }

    @Test
    public void testEmpty() {
        var ai = createIterator(EMPTY_STRING_ARRAY);
        assertFalse(ai.hasNext());
    }

    @Test
    public void testOneElement() {
        var oneElement = new String[]{"hello"};
        var ai = createIterator(oneElement);
        assertTrue(ai.hasNext());
        var hello = ai.next();
        assertEquals(hello, "hello");
        assertFalse(ai.hasNext());
    }

    @Test
    public void testTwoElements() {
        var elements = new String[]{"hello", "world"};
        var ai = createIterator(elements);
        assertTrue(ai.hasNext());