// Path: src/main/java/com/hadisatrio/optional/function/ShortConsumer.java
// public interface ShortConsumer {
// 
//     void consume(short value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortSupplier.java
// public interface ShortSupplier {
// 
//     short get();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Function.java
// public interface Function {
// 
//     void call();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Supplier.java
// public interface Supplier<T> {
// 
//     T get();
// }


import com.hadisatrio.optional.function.ShortConsumer;
import com.hadisatrio.optional.function.ShortSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;
    }

    @Test
    public void or() throws Exception {
        Assert.assertEquals(((short) 42), OptionalShort.absent().or(((short) 42)));
    }

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals((short) 42, OptionalShort.absent().or(new ShortSupplier() {
            @Override
            public short get() {
                return 42;
            }
        }));
    }

    @Test
    public void orThrow() throws Exception {
        try {
            OptionalShort.absent().orThrow(new Exception("An exception occurred."));

            Assert.fail("Invoking orThrow() on an absent optional should throw an exception.");
        } catch (Exception anException) {
            // No-op. This is the expected behaviour.
        }
    }

    @Test
    public void orThrowWithSupplier() throws Exception {
// Path: src/main/java/com/hadisatrio/optional/function/ShortConsumer.java
// public interface ShortConsumer {
// 
//     void consume(short value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ShortSupplier.java
// public interface ShortSupplier {
// 
//     short get();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Function.java
// public interface Function {
// 
//     void call();
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/Supplier.java
// public interface Supplier<T> {
// 
//     T get();
// }


// Path: src/test/java/com/hadisatrio/optional/OptionalShortTest.java
import com.hadisatrio.optional.function.ShortConsumer;
import com.hadisatrio.optional.function.ShortSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;

    }

    @Test
    public void or() throws Exception {
        Assert.assertEquals(((short) 42), OptionalShort.absent().or(((short) 42)));
    }

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals((short) 42, OptionalShort.absent().or(new ShortSupplier() {
            @Override
            public short get() {
                return 42;
            }
        }));
    }

    @Test
    public void orThrow() throws Exception {
        try {
            OptionalShort.absent().orThrow(new Exception("An exception occurred."));

            Assert.fail("Invoking orThrow() on an absent optional should throw an exception.");
        } catch (Exception anException) {
            // No-op. This is the expected behaviour.
        }
    }

    @Test
    public void orThrowWithSupplier() throws Exception {
        final Supplier<Exception> anExceptionSupplier = new Supplier<Exception>() {