public HibernateRedDeerTest() {
    super();

    EditorHandler.getInstance().closeAll(false);

    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    pe.deleteAllProjects();

    sim.unregisterAll();
    String enabled = System.getProperty("hibernate.reddeer.errorLogInterceptor");
    if (enabled != null) sim.register(LOG_INTERCEPTOR, new ErrorLogInterceptor());
  }
public class HibernateRedDeerTest {

  private SyncInterceptorManager sim = SyncInterceptorManager.getInstance();
  private final String LOG_INTERCEPTOR = "error-log-interceptor";
  private static String dbFolder = System.getProperty("test.database");

  @BeforeClass
  public static void beforeClass() {
    DatabaseUtils.runSakilaDB(dbFolder);
  }

  @AfterClass
  public static void afterClass() {
    DatabaseUtils.stopSakilaDB();
  }

  public HibernateRedDeerTest() {
    super();

    EditorHandler.getInstance().closeAll(false);

    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    pe.deleteAllProjects();

    sim.unregisterAll();
    String enabled = System.getProperty("hibernate.reddeer.errorLogInterceptor");
    if (enabled != null) sim.register(LOG_INTERCEPTOR, new ErrorLogInterceptor());
  }

  public static void importProject(String prjName) {
    ProjectImporter.importProjectWithoutErrors(Activator.PLUGIN_ID, prjName);
  }
}