Merge pull request #7173 from amit2103/BAEL-14274-7
[BAEL-14274] - Fixed article code for https://www.baeldung.com/java-o…
This commit is contained in:
commit
9d9806306a
|
@ -259,4 +259,15 @@ public class OptionalUnitTest {
|
|||
LOG.debug("Getting default value...");
|
||||
return "Default Value";
|
||||
}
|
||||
|
||||
// Uncomment code when code base is compatiable with Java 11
|
||||
// @Test
|
||||
// public void givenAnEmptyOptional_thenIsEmptyBehavesAsExpected() {
|
||||
// Optional<String> opt = Optional.of("Baeldung");
|
||||
// assertFalse(opt.isEmpty());
|
||||
//
|
||||
// opt = Optional.ofNullable(null);
|
||||
// assertTrue(opt.isEmpty());
|
||||
// }
|
||||
|
||||
}
|
Loading…
Reference in New Issue