@Test
	public void testMasterTableUndo() throws IOException {
		createIndexedTables(false);
		Table[] tables = dbh.getTables();
		String table1Name = tables[1].getName();

		// delete a table - and rollback
		long txId = dbh.startTransaction();
		for (Table table : tables) {
			dbh.deleteTable(table.getName());
		}
		dbh.endTransaction(txId, false);

		assertTrue(dbh.getBufferMgr().atCheckpoint());

		try {
			tables[1].getName();
			Assert.fail();
		}
		catch (Exception e) {
			// Ignore
		}

		Schema s = tables[1].getSchema();
		DBRecord rec = s.createRecord(1);

		txId = dbh.startTransaction();
		try {
			tables[1].putRecord(rec);
			Assert.fail();
		}
		catch (Exception e) {
			// Ignore
		}
		assertTrue(dbh.getBufferMgr().atCheckpoint());

		Table t = dbh.getTable(table1Name);
		assertEquals(table1Name, t.getName());

		t.putRecord(rec);
		assertTrue(!dbh.getBufferMgr().atCheckpoint());
		dbh.endTransaction(txId, true);

		assertEquals(rec, t.getRecord(1));

		// delete a table - and commit
		txId = dbh.startTransaction();
		dbh.deleteTable(table1Name);
		dbh.endTransaction(txId, true);

		assertTrue(dbh.undo());

		t = dbh.getTable(table1Name);
		assertEquals(table1Name, t.getName());

		assertTrue(dbh.redo());

		t = dbh.getTable(table1Name);
		assertNull(t);

	}
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