private boolean applyCmd(Program p, Command<Program> c) {
		int txId = p.startTransaction(c.getName());
		boolean commit = true;
		try {
			return c.applyTo(p);
		}
		catch (RollbackException e) {
			commit = false;
			throw e;
		}
		finally {
			p.endTransaction(txId, commit);
		}
	}
Test for the add memory block command.
Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java