/*
   * (non-Javadoc)
   *
   * @see junit.framework.TestCase#setUp()
   */
  @Override
  protected void setUp() throws Exception {
    super.setUp();

    // Get the ElementDao Singleton for managing Element data
    this.elementDao = (ElementDao) super.getBeanFactory().getBean("ElementDao");

    // Create empty Activity
    this.element = new Element();
  }
  /*
   * (non-Javadoc)
   *
   * @see junit.framework.TestCase#tearDown()
   */
  @Override
  protected void tearDown() throws Exception {
    super.tearDown();

    // Delete the tmp element from the database.
    try {
      this.elementDao.getHibernateTemplate().delete(this.element);
    } catch (Exception exception) {
      // None.
    }
  }