@Test
	public void testAddOverlayBlock() throws Exception {
		Address addr = getX08Addr(0x3000);
		command = new AddInitializedMemoryBlockCmd(".overlay", "A Test", "new block", addr, 100,
			true, true, true, false, (byte) 0xa, true);
		assertTrue(applyCmd(x08, command));

		MemoryBlock block = null;
		MemoryBlock[] blocks = x08.getMemory().getBlocks();
		for (MemoryBlock block2 : blocks) {
			if (block2.getName().equals(".overlay")) {
				block = block2;
				break;
			}
		}
		assertNotNull(block);
		assertEquals(MemoryBlockType.DEFAULT, block.getType());
		assertTrue(block.isOverlay());
		byte b = block.getByte(block.getStart().getNewAddress(0x3000));
		assertEquals((byte) 0xa, b);
	}
Test for the add memory block command.
Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java