@Test
  public void associateTagAndCourses() {
    CourseDataOnDemand courseDod = new CourseDataOnDemand();
    Course c1 = courseDod.getNewTransientCourse(0);
    Course c2 = courseDod.getNewTransientCourse(1);

    TagDataOnDemand tagDod = new TagDataOnDemand();
    Tag tag = tagDod.getNewTransientTag(0);

    tag.getCourses().add(c1);
    tag.getCourses().add(c2);

    tag.persist();
    tag.flush();
    tag.clear();

    Assert.assertEquals(2, tag.findTag(tag.getId()).getCourses().size());
  }
 public void startElement(String name, AttributeList attributes) {
   currentTag.clear();
   currentTag.setName(name);
 }