@Test
	public void testAddByteOverlayBlock() {
		Address addr = getX08Addr(0x3000);
		command = new AddByteMappedMemoryBlockCmd(".testByte", "A Test", "new block", addr, 100,
			true, true, true, false, getX08Addr(0), true);
		assertTrue(applyCmd(x08, command));

		MemoryBlock block = x08.getMemory().getBlock(addr);
		assertNull(block);
		block = x08.getMemory().getBlock(".testByte");
		assertNotNull(block);
		assertEquals(100, block.getSize());
		AddressSpace space = x08.getAddressFactory().getAddressSpace(".testByte");
		assertTrue(space instanceof OverlayAddressSpace);
		OverlayAddressSpace ospace = (OverlayAddressSpace) space;
		assertTrue(space.isOverlaySpace());
		assertEquals(space.getAddress(0x3000), block.getStart());
		assertEquals(space.getAddress(0x3063), block.getEnd());
		assertEquals(block.getStart(), ospace.getOverlayAddressSet().getMinAddress());
		assertEquals(block.getEnd(), ospace.getOverlayAddressSet().getMaxAddress());
		MemoryBlockSourceInfo info = block.getSourceInfos().get(0);
		AddressRange mappedRange = info.getMappedRange().get();
		assertEquals(100, mappedRange.getLength());
		assertEquals(getX08Addr(0), mappedRange.getMinAddress());
		assertEquals(getX08Addr(99), mappedRange.getMaxAddress());
		assertEquals(MemoryBlockType.BYTE_MAPPED, block.getType());
		assertTrue(block.isOverlay());
	}
Test for the add memory block command.
Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java