@Before public void setup() throws Exception { DbDeployerAppContext context = getAppContext.valueOf(1); context.setupEnvInfra(); this.logicalSchema1 = context.getEnvironment().getSchemas().getFirst().getName(); // pick one from the environment at random as our logical schema so that we can test the retrieval logic this.logicalSchema2 = "MYSCHEMA2"; // this is just for testing in this DAO, no need to tie to the actual logical schema this.testSchema = context.getEnvironment().getPhysicalSchema(this.logicalSchema1); this.platform = context.getEnvironment().getPlatform(); this.conn = context.getDataSource().getConnection(); this.jdbcHelper = ((AbstractSqlExecutor) context.getSqlExecutor()).createJdbcHelper(context.getDataSource()); this.artifactDeployerDao = (SameSchemaChangeAuditDao) ((DbDeployerAppContextImpl) context).getArtifactDeployerDao(); this.deployExecutionDao = (SameSchemaDeployExecutionDao) context.getDeployExecutionDao(); }