diff --git a/libraries-2/src/test/java/com/baeldung/freebuilder/EmployeeBuilderUnitTest.java b/libraries-2/src/test/java/com/baeldung/freebuilder/EmployeeBuilderUnitTest.java index fef60d9e7c..4427d3cb69 100644 --- a/libraries-2/src/test/java/com/baeldung/freebuilder/EmployeeBuilderUnitTest.java +++ b/libraries-2/src/test/java/com/baeldung/freebuilder/EmployeeBuilderUnitTest.java @@ -86,13 +86,14 @@ public class EmployeeBuilderUnitTest { .setEmail("abc@xyz.com") .setSupervisorName("Admin") .setPhoneNumber(4445566) - .setNullablePermanent(null) - .setDateOfJoining(Optional.empty()) + .setPermanent(true) .setRole("developer") .setAddress(address) .build(); // then + assertTrue(employee.getPermanent().isPresent()); + assertTrue(employee.getPermanent().get()); assertFalse(employee.getDateOfJoining().isPresent()); }