@Test
public void testUpdateRating() {

    Attendee jonathanDoe = sessionVote.registerAttendee(new Attendee("Jonathan Doe"));
    String id = jonathanDoe.getId();
    SessionRating originalRating = new SessionRating("session1", id, 5);
    originalRating = sessionVote.rateSession(originalRating);
    Attendee jonathanDoe2 = sessionVote.registerAttendee(new Attendee("Jonathan Doe2"));
    String id2 = jonathanDoe2.getId();
    SessionRating updatedRating = new SessionRating(originalRating.getId(), "session2", id2, 7);
    // API method under test
    updatedRating = sessionVote.updateRating(updatedRating.getId(), updatedRating);
    assertEquals("Unexpected session in updated rating", "session2", updatedRating.getSession());
    assertEquals("Unexpected attendee ID in updated rating", id2, updatedRating.getAttendeeId());
    assertEquals("Unexpected rating value in updated rating", 7, updatedRating.getRating());
    // Now check that the SessionRating stored in the system matches the updated SessionRating that was returned
    assertTrue("The session vote service is missing the newly-updated session rating", sessionVote.getAllSessionRatings().contains(updatedRating));
}