@Test
 public void clearViews() throws Exception {
   assertEquals(1, defaultDatabase.getViewNames("PUBLIC").size());
   assertEquals(1, defaultDatabase.getViewNames("SCHEMA_A").size());
   assertEquals(1, defaultDatabase.getViewNames("SCHEMA_B").size());
   defaultDBClearer.clearDatabase();
   assertTrue(defaultDatabase.getViewNames("PUBLIC").isEmpty());
   assertTrue(defaultDatabase.getViewNames("SCHEMA_A").isEmpty());
   assertTrue(defaultDatabase.getViewNames("SCHEMA_B").isEmpty());
 }
  @Before
  public void initialize() throws Exception {
    defaultDatabase = TestUtils.getDatabases().getDefaultDatabase();
    dataSource = defaultDatabase.getDataSource();

    executedScriptInfoSource = getDefaultExecutedScriptInfoSource(defaultDatabase, true);
    executedScriptInfoSource.registerExecutedScript(createScript("1_folder/1_script.sql"));
    executedScriptInfoSource.registerExecutedScript(createScript("1_folder/2_script.sql"));
    executedScriptInfoSource.registerExecutedScript(createScript("2_folder/1_script.sql"));
    executedScriptInfoSource.registerExecutedScript(createScript("repeatable/script.sql"));
    executedScriptInfoSource.registerExecutedScript(createScript("postprocessing/script.sql"));
  }
  @Before
  public void setUp() throws Exception {
    databases = getDatabases("PUBLIC", "SCHEMA_A", "SCHEMA_B");
    defaultDatabase = databases.getDefaultDatabase();
    dataSource = defaultDatabase.getDataSource();

    ConstraintsDisabler constraintsDisabler = new DefaultConstraintsDisabler(databases);
    ExecutedScriptInfoSource executedScriptInfoSource =
        getDefaultExecutedScriptInfoSource(defaultDatabase, true);

    defaultDBClearer =
        new DefaultDBClearer(
            databases,
            new HashSet<DbItemIdentifier>(),
            new HashSet<DbItemIdentifier>(),
            constraintsDisabler,
            executedScriptInfoSource);

    dropTestDatabase();
    createTestDatabase();
  }