{
System.out.println("create");
assertTrue(instance.isOpen());
CourseDAO courseDAO = new CourseDAO(testDb.getConnection());
Course course = courseDAO.find(2L);
GradedEvent testGradedEvent = new GradedEvent();
testGradedEvent.setId(new Long(42L));
testGradedEvent.setCourse(course);
testGradedEvent.setAssignment("Final");
testGradedEvent.setTerm("Spring 2010");
testGradedEvent.setVersion("M1");
Long newId = instance.create(testGradedEvent);
assertNotNull(newId);
assertEquals(newId, new Long(42L));
assertEquals(5, instance.getGradedEventsByCourseAndAssignment().size());
GradedEvent result = instance.find(new Long(42L));
assertNotNull(result);
assertEquals("Final", result.getAssignment());
assertEquals("Spring 2010", result.getTerm());
assertEquals("M1", result.getVersion());
assertEquals(course, result.getCourse());
assertEquals(testGradedEvent, result);
courseDAO.closeConnection();
}