*/
@Test
public void voidTestFlushAndIndex()
{
final long enrollmentId = 2042L;
Enrollment enrollment = jpaEnrollmentMapper.findById(enrollmentId);
ArrayList<BackgroundItem> activities = new ArrayList<BackgroundItem>(3);
activities.add(new BackgroundItem("a", BackgroundItemType.ACTIVITY_OR_SOCIETY));
activities.add(new BackgroundItem("b", BackgroundItemType.ACTIVITY_OR_SOCIETY));
activities.add(new BackgroundItem("c", BackgroundItemType.ACTIVITY_OR_SOCIETY));
enrollment.setActivities(activities);
ArrayList<BackgroundItem> areasOfStudy = new ArrayList<BackgroundItem>(3);
areasOfStudy.add(new BackgroundItem("d", BackgroundItemType.AREA_OF_STUDY));
areasOfStudy.add(new BackgroundItem("e", BackgroundItemType.AREA_OF_STUDY));
areasOfStudy.add(new BackgroundItem("f", BackgroundItemType.AREA_OF_STUDY));
areasOfStudy.add(new BackgroundItem("g", BackgroundItemType.AREA_OF_STUDY));
enrollment.setAreasOfStudy(areasOfStudy);
jpaEnrollmentMapper.flush("2d359911-0977-418a-9490-57e8252b1142");
jpaEnrollmentMapper.getEntityManager().clear();
enrollment = jpaEnrollmentMapper.findById(enrollmentId);
assertEquals("Expected enrollment to contain activity", 3, enrollment.getActivities().size());
assertEquals("Expected enrollment to contain area of study", 4, enrollment.getAreasOfStudy().size());
}