### Question:
Env extends NativeObject implements Closeable { public Stat stat() { MDBX_stat rc = new MDBX_stat(); mdbx_env_stat(pointer(), rc, JNI.SIZEOF_STAT); return new Stat(rc); } Env(String path);  Env(); static String version(); void open(String path); void open(String path, int flags); void open(String path, int flags, int mode); void open(String path, EnvConfig config); @Override void close(); void copy(String path); void copy(String path, int flags); void sync(boolean force); void setMapSize(long size); void setMaxDbs(long size); long getMaxReaders(); void setMaxReaders(long size); long getMaxKeySize(); int getFlags(); void addFlags(int flags); void removeFlags(int flags); EnvInfo info(); Stat stat(); float percentageFull(); Transaction createTransaction(); Transaction createTransaction(boolean readOnly); Transaction createReadTransaction(); Transaction createWriteTransaction(); Transaction createTransaction(Transaction parent); Transaction createTransaction(Transaction parent, boolean readOnly); Database openDatabase(Transaction tx, String name, int flags); Database openDatabase(Transaction tx, String name, DatabaseConfig config); Database openDatabase(); Database openDatabase(Comparator<byte[]> keyComp, Comparator<byte[]> dataComp); Database openDatabase(String name); Database openDatabase(String name, Comparator<byte[]> keyComp, Comparator<byte[]> dataComp); Database openDatabase(String name, int flags); Database openDatabase(String name, int flags, Comparator<byte[]> keyComp,  
			Comparator<byte[]> dataComp); Database openDatabase(String name, DatabaseConfig config); Database openDatabase(Transaction tx, String name, int flags, Comparator<byte[]> keyComp, 
			Comparator<byte[]> dataComp); long compareKey(long o1, long o2); long compareData(long o1, long o2); SecondaryDatabase openSecondaryDatabase(Database primary, String name); SecondaryDatabase openSecondaryDatabase(Database primary, String name, int flags); SecondaryDatabase openSecondaryDatabase(Transaction tx, Database primary, String name, int flags); SecondaryDatabase openSecondaryDatabase(Database primary, String name, SecondaryDbConfig config); SecondaryDatabase openSecondaryDatabase(Transaction tx, Database primary, String name,
			SecondaryDbConfig config); static void pushMemoryPool(int size); static void popMemoryPool();  }### Answer:
@Test public void testStat() throws Exception { String path = tmp.newFolder().getCanonicalPath(); try (Env env = new Env()) { env.open(path); env.setMapSize(1048576L); try (Database db = env.openDatabase()) { db.put(new byte[]{1}, new byte[]{1}); db.put(new byte[]{2}, new byte[]{1}); Stat stat = env.stat(); System.out.println(stat); assertThat(stat.ms_entries, is(2L)); assertThat(stat.ms_psize, is(not(0L))); assertThat(stat.ms_overflow_pages, is(0L)); assertThat(stat.ms_depth, is(1L)); assertThat(stat.ms_leaf_pages, is(1L)); } } }