@Test
public void testCreate() {
System.out.println("EventController:Create");
EventController eventController = new EventController();
Date eventDate = new Date();
Event event = new Event("Title", 0, "Your Desk", eventDate, 1, "Unit tests point", project, scrumMaster);
event.addGuest(guest1);
event.addGuest(guest2);
event.addGuest(guest3);
Event eventResult = eventController.create(event);
//Check Release properties.
assertNotNull(eventResult.getId());
assertEquals(event.getTitle(), eventResult.getTitle());
assertEquals(event.getEventType(), eventResult.getEventType());
assertEquals(event.getPlace(), eventResult.getPlace());
assertEquals(event.getDuration(), eventResult.getDuration());
assertEquals(event.getDescription(), eventResult.getDescription());
assertEquals(event.getProject(), eventResult.getProject());
assertEquals(event.getOrganizer(), eventResult.getOrganizer());
assertEquals(3, eventResult.getGuests().size());
assertTrue(eventResult.getGuests().contains(guest1));
assertTrue(eventResult.getGuests().contains(guest2));
assertTrue(eventResult.getGuests().contains(guest3));
assertFalse(eventResult.getGuests().contains(scrumMaster));
//Check project properties.
project = projectController.refresh(project);
assertTrue(project.getEvents().contains(eventResult));