@Test
public void testRateSession() {

    Attendee jonathanDoe = sessionVote.registerAttendee(new Attendee("Jonathan Doe"));
    String id = jonathanDoe.getId();
    SessionRating sessionRating = new SessionRating("session1", id, 5);
    // API method under test:
    sessionRating = sessionVote.rateSession(sessionRating);
    assertEquals("Returned SessionRating's session name does not match expected session name", "session1", sessionRating.getSession());
    assertEquals("Returned SessionRating's attendee ID does not match expected attendee ID", id, sessionRating.getAttendeeId());
    assertEquals("Returned SessionRating's rating value does not match expected value", 5, sessionRating.getRating());
    // Now check that the SessionRating stored in the system matches what was returned
    assertTrue("The session vote service is missing the newly-submitted session rating", sessionVote.getAllSessionRatings().contains(sessionRating));
}