// Path: src/main/java/com/hadisatrio/optional/function/ByteConsumer.java
// public interface ByteConsumer {
// 
//     void consume(byte value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ByteSupplier.java
// public interface ByteSupplier {
// 
//     byte 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.ByteConsumer;
import com.hadisatrio.optional.function.ByteSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;
    @Test
    public void get() throws Exception {
        Assert.assertEquals(((byte) 42), OptionalByte.of(((byte) 42)).get());

        try {
            OptionalByte.absent().get();

            Assert.fail("Invoking get() on an absent optional should raise an exception.");
        } catch (IllegalStateException expected) {
            // No-op. This is the expected behaviour.
        }
    }

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

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals((byte) 42, OptionalByte.absent().or(new ByteSupplier() {
            @Override
            public byte get() {
                return 42;
            }
        }));
    }

    @Test
    public void orThrow() throws Exception {
// Path: src/main/java/com/hadisatrio/optional/function/ByteConsumer.java
// public interface ByteConsumer {
// 
//     void consume(byte value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/ByteSupplier.java
// public interface ByteSupplier {
// 
//     byte 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/OptionalByteTest.java
import com.hadisatrio.optional.function.ByteConsumer;
import com.hadisatrio.optional.function.ByteSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;

    @Test
    public void get() throws Exception {
        Assert.assertEquals(((byte) 42), OptionalByte.of(((byte) 42)).get());

        try {
            OptionalByte.absent().get();

            Assert.fail("Invoking get() on an absent optional should raise an exception.");
        } catch (IllegalStateException expected) {
            // No-op. This is the expected behaviour.
        }
    }

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

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals((byte) 42, OptionalByte.absent().or(new ByteSupplier() {
            @Override
            public byte get() {
                return 42;
            }
        }));
    }

    @Test
    public void orThrow() throws Exception {
        try {