@After
 public void onTearDown() throws Exception {
   try {
     FileFolderManager.deleteFolder("c:\\tmp\\uploads\\componentId", false);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
   super.onTearDown();
 }
 @After
 public void onTearDown() throws Exception {
   Mailbox.clearAll();
   IDatabaseConnection connection = null;
   try {
     connection = getConnection();
     DatabaseOperation.DELETE_ALL.execute(connection, getDataSet());
   } catch (Exception ex) {
     ex.printStackTrace();
   } finally {
     if (connection != null) {
       try {
         connection.getConnection().close();
       } catch (SQLException e) {
         e.printStackTrace();
       }
     }
   }
   super.onTearDown();
 }
 @Before
 public void onSetUp() {
   super.onSetUp();
   Mailbox.clearAll();
   IDatabaseConnection connection = null;
   try {
     connection = getConnection();
     DatabaseOperation.DELETE_ALL.execute(connection, getDataSet());
     DatabaseOperation.CLEAN_INSERT.execute(connection, getDataSet());
   } catch (Exception ex) {
     ex.printStackTrace();
   } finally {
     if (connection != null) {
       try {
         connection.getConnection().close();
       } catch (SQLException e) {
         e.printStackTrace();
       }
     }
   }
   ServicesFactory.getInstance().setApplicationContext(applicationContext);
 }
 protected void onSetUp() {
   super.onSetUp();
   HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
   HttpUnitOptions.setExceptionsThrownOnScriptError(false);
   HttpUnitOptions.setScriptingEnabled(true);
   ClientProperties.getDefaultProperties().setAcceptCookies(true);
   ClientProperties.getDefaultProperties().setAutoRedirect(true);
   IDatabaseConnection connection = null;
   try {
     connection = getConnection();
     DatabaseOperation.DELETE_ALL.execute(connection, getDataSet());
     DatabaseOperation.CLEAN_INSERT.execute(connection, getDataSet());
   } catch (Exception ex) {
     ex.printStackTrace();
   } finally {
     if (connection != null) {
       try {
         connection.getConnection().close();
       } catch (SQLException e) {
         e.printStackTrace();
       }
     }
   }
 }