    @Test
    public void testUpdateAttendee() {

        Attendee jonathanDoe = sessionVote.registerAttendee(new Attendee("Jonathan Doe"));
        String id = jonathanDoe.getId();
        Attendee jonDoe = new Attendee(id, "Jon Doe");

        // API method under test:
        Attendee attendee = sessionVote.updateAttendee(id, jonDoe);
        assertEquals("Attendee's name was not updated as expected", "Jon Doe", attendee.getName());
        assertEquals("Attendee's ID was updated when it was expected to stay the same", id, attendee.getId());

        // Now verify that there is only one attendee in the system, and that it is the correct one:
        Collection<Attendee> attendees = sessionVote.getAllAttendees();
        assertEquals("An unexpected number of attendees have been registered", 1, attendees.size());
        assertTrue("The session vote service is missing the updated attendee", attendees.contains(attendee));
    }