// Path: src/main/java/com/hadisatrio/optional/function/FloatConsumer.java
// public interface FloatConsumer {
// 
//     void consume(float value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/FloatSupplier.java
// public interface FloatSupplier {
// 
//     float 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.FloatConsumer;
import com.hadisatrio.optional.function.FloatSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;
    }

    @Test
    public void isPresent() throws Exception {
        Assert.assertTrue(OptionalFloat.of(42f).isPresent());

        Assert.assertFalse(OptionalFloat.absent().isPresent());
    }

    @Test
    public void get() throws Exception {
        Assert.assertEquals(42f, OptionalFloat.of(42f).get(), 0);

        try {
            OptionalFloat.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(42f, OptionalFloat.absent().or(42f), 0);
    }

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals(42f, OptionalFloat.absent().or(new FloatSupplier() {
// Path: src/main/java/com/hadisatrio/optional/function/FloatConsumer.java
// public interface FloatConsumer {
// 
//     void consume(float value);
// }
// 
// Path: src/main/java/com/hadisatrio/optional/function/FloatSupplier.java
// public interface FloatSupplier {
// 
//     float 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/OptionalFloatTest.java
import com.hadisatrio.optional.function.FloatConsumer;
import com.hadisatrio.optional.function.FloatSupplier;
import com.hadisatrio.optional.function.Function;
import com.hadisatrio.optional.function.Supplier;
import org.junit.Assert;
import org.junit.Test;

    }

    @Test
    public void isPresent() throws Exception {
        Assert.assertTrue(OptionalFloat.of(42f).isPresent());

        Assert.assertFalse(OptionalFloat.absent().isPresent());
    }

    @Test
    public void get() throws Exception {
        Assert.assertEquals(42f, OptionalFloat.of(42f).get(), 0);

        try {
            OptionalFloat.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(42f, OptionalFloat.absent().or(42f), 0);
    }

    @Test
    public void orWithSupplier() throws Exception {
        Assert.assertEquals(42f, OptionalFloat.absent().or(new FloatSupplier() {
            @Override