@Test
	public void testAddBitBlock() {
		Address addr = getX08Addr(0x3000);
		command = new AddBitMappedMemoryBlockCmd(".testBit", "A Test", "new block", addr, 100, true,
			true, true, false, getX08Addr(0), false);
		assertTrue(applyCmd(x08, command));
		// map 100 byte block from source of 12-bytes (96 bits) + partial byte (4 bits)
		MemoryBlock block = x08.getMemory().getBlock(addr);
		assertNotNull(block);
		assertEquals(100, block.getSize());
		assertEquals(getX08Addr(0x3000), block.getStart());
		assertEquals(getX08Addr(0x3063), block.getEnd());
		MemoryBlockSourceInfo info = block.getSourceInfos().get(0);
		AddressRange mappedRange = info.getMappedRange().get();
		assertEquals(13, mappedRange.getLength());
		assertEquals(getX08Addr(0), mappedRange.getMinAddress());
		assertEquals(getX08Addr(12), mappedRange.getMaxAddress());
		assertEquals(MemoryBlockType.BIT_MAPPED, block.getType());
		assertFalse(block.isOverlay());
	}
Test for the add memory block command.
Ghidra/Features/Base/src/test/java/ghidra/app/cmd/memory/AddMemoryBlockCmdTest.java