@BeforeEach
    void beforeEach() {
        // Ensure we work with an empty DB, so we migrate from a clean slate.
        // This thread may have run migrations for other tests.
        LOGGER.info("beforeEach() - Dropping DB");
        DbTestUtil.dropThreadTestDatabase(true);

        LOGGER.info("Running all migrations up to and including {}, using test data {}",
                targetVersion, testDataVersion);
        injector = Guice.createInjector(
                new DbTestModule(),
                getDbConnectionsModule(),
                new AbstractModule() {
                    @Override
                    protected void configure() {
                        // Bind the test state so the migration get at it
                        bind(TestState.class)
                                .toInstance(new TestState(
                                        targetVersion,
                                        testDataVersion,
                                        getTestDataClass(),
                                        AbstractCrossModuleMigrationTest.this.getClass(),
                                        getTargetClass()));
                    }
                });
    }
Get an instance of a datasource for use when asserting database state after the migration has
been run.
stroom-app/src/test/java/stroom/app/db/migration/AbstractCrossModuleMigrationTest.java