private MemoryBlock addBlock(String name, long offset, int length) throws Exception {
		Memory memory = program.getMemory();
		Address start = addr(offset);
		try {
			MemoryBlock block = memory.createInitializedBlock(name, start, length, (byte) 0,
				TaskMonitor.DUMMY, false);
			return block;

		}
		catch (AddressOverflowException e) {
			Assert.fail(e.getMessage());
		}
		catch (MemoryConflictException e) {
			Assert.fail(e.getMessage());
		}
		catch (LockException e) {
			Assert.fail(e.getMessage());
		}
		return null;
	}
Method addBlock.
@param name block name
@param offset offset for the starting address
@param length number of bytes in the block
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/module/ModuleTest.java