@Test
	public void testTransaction() {

		AddressRangeMapDB map = new AddressRangeMapDB(program.getDBHandle(), addrMap,
			new Lock("Test"), "TEST", this, LongField.INSTANCE, true);

		try {
			map.paintRange(addr(0), addr(0x1000), ONE);
			Assert.fail("expected no-transaction exception");
		}
		catch (NoTransactionException e) {
			// expected
		}

		int id = program.startTransaction("TEST");
		try {
			map.paintRange(addr(0), addr(0x1000), ONE);
		}
		finally {
			program.endTransaction(id, true);
		}

		try {
			map.paintRange(addr(800), addr(0x1000), TWO);
			Assert.fail("expected no-transaction exception");
		}
		catch (NoTransactionException e) {
			// expected
		}
	}
@see db.util.ErrorHandler#dbError(java.io.IOException)
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMapDBTest.java