@Test
	public void testOpenForReadOnlyDuringUpdate() throws IOException {
		saveAsAndReopen(dbName);

		BufferFile bf2 = new LocalManagedBufferFile(fileMgr, false, -1, -1);
		DBHandle dbh2 = null;
		try {
			dbh2 = new DBHandle(bf2);
			createNonIndexedTables(false, DBTestUtils.MAX_SCHEMA_TYPE + 1);
			saveAndReopen();
			assertEquals(DBTestUtils.MAX_SCHEMA_TYPE + 1, dbh.getTableCount());
			assertEquals(0, dbh2.getTableCount());
		}
		finally {
			if (dbh2 != null) {
				dbh2.close();
			}
			bf2.close();
		}
	}
Test the creation of a new database with indexed and non-indexed tables.
Tests include the removal of tables and are performed for both a stored and
non-stored database.
Ghidra/Framework/DB/src/test/java/db/DBTest.java