diff --git a/core-java/src/test/java/com/baeldung/java8/optional/OptionalTest.java b/core-java/src/test/java/com/baeldung/java8/optional/OptionalTest.java index 8aeaf2b9f7..c0538931b0 100644 --- a/core-java/src/test/java/com/baeldung/java8/optional/OptionalTest.java +++ b/core-java/src/test/java/com/baeldung/java8/optional/OptionalTest.java @@ -99,6 +99,7 @@ public class OptionalTest { assertFalse(priceIsInRange1(new Modem(9.9))); assertFalse(priceIsInRange1(new Modem(null))); assertFalse(priceIsInRange1(new Modem(15.5))); + assertFalse(priceIsInRange1(null)); } @@ -108,6 +109,7 @@ public class OptionalTest { assertFalse(priceIsInRange2(new Modem(9.9))); assertFalse(priceIsInRange2(new Modem(null))); assertFalse(priceIsInRange2(new Modem(15.5))); + assertFalse(priceIsInRange1(null)); } public boolean priceIsInRange1(Modem modem) {