private TestEnv createEnv() throws IOException {
        final Path dbDir = Files.createTempDirectory("stroom");
        final EnvFlags[] envFlags = new EnvFlags[]{
                EnvFlags.MDB_NOTLS
        };

        LOGGER.info("Creating LMDB environment with maxSize: {}, dbDir {}, envFlags {}",
                getMaxSizeBytes(),
                dbDir.toAbsolutePath(),
                Arrays.toString(envFlags));

        final PathCreator pathCreator = new SimplePathCreator(() -> dbDir, () -> dbDir);
        final TempDirProvider tempDirProvider = () -> dbDir;

        final LmdbEnv lmdbEnv = new LmdbEnvFactory(pathCreator,
                new LmdbLibrary(pathCreator, tempDirProvider, LmdbLibraryConfig::new))
                .builder(dbDir)
                .withMapSize(getMaxSizeBytes())
                .withMaxDbCount(10)
                .withEnvFlags(envFlags)
                .makeWritersBlockReaders()
                .build();

        return new TestEnv(dbDir, lmdbEnv);
    }
Useful for comparing the behaviour of two different envs
stroom-lmdb/src/test/java/stroom/lmdb/AbstractDualEnvLmdbTest.java