@Test
  public void testUpdateStudent_passnull() {

    // Given
    StudentDirectoryServiceImpl studentDirectoryService = new StudentDirectoryServiceImpl();

    try {
      // When
      studentDirectoryService.updateStudent(null);
      fail("An exception should have been thrown for a null value passed as a parameter.");
    } catch (Exception e) {
      // Then
      assertTrue(e instanceof NullPointerException);
      assertEquals("Unable to update a student. The student cannot be null.", e.getMessage());
    }
  }
  @Test
  public void testUpdateStudent_happypath() {

    // Given
    StudentDirectoryServiceImpl studentDirectoryService = new StudentDirectoryServiceImpl();

    StudentDAO studentDAO = mock(StudentDAO.class);
    studentDirectoryService.setStudentDAO(studentDAO);

    Student testStudent = new Student();
    testStudent.setFirstName("Michael");
    testStudent.setLastName("Bluth");

    // When
    studentDirectoryService.updateStudent(testStudent);

    // Then
    ArgumentCaptor<Student> studentCaptor = ArgumentCaptor.forClass(Student.class);
    verify(studentDAO, times(1)).updateStudent(studentCaptor.capture());

    assertEquals("Michael", studentCaptor.getValue().getFirstName());
    assertEquals("Bluth", studentCaptor.getValue().getLastName());
  }