public void run() {

    validate();
    if (!super.getNotification().hasErrors()) {
      LOGGER.info("Register worker in backend system");
    }
  }
@Test
    void runWithUnderageDOB() {
        RegisterWorkerDto workerDto = createValidWorkerDto();
        workerDto.setDateOfBirth(LocalDate.now().minusYears(17)); // Under 18
        workerDto.setupWorkerDto("name", "occupation", LocalDate.now().minusYears(17));
        RegisterWorker registerWorker = new RegisterWorker(workerDto);

        // Run the registration process
        registerWorker.run();

        // Verify that the notification contains the underage DOB error
        assertTrue(registerWorker.getNotification().hasErrors());
        assertTrue(registerWorker.getNotification().getErrors().contains(RegisterWorkerDto.DOB_TOO_SOON));
        assertEquals(registerWorker.getNotification().getErrors().size(), 1);
    }