@Before public void startupDatabase() { ConfigFile configFileAnnotation = getClass().getAnnotation(ConfigFile.class); assert configFileAnnotation != null; Database.ensureStarted(new File(configFileAnnotation.value())); db = new Database(SecurityManager.SYSTEM_USER); wipeDatabase(); ListenerManager.configureTriggerDispatcher(db); // config file gets erased by command above }