@Test
	public void testBlocksMerged() throws Exception {

		MemoryBlock[] blocks = memory.getBlocks();

		tx(program, () -> {
			MemoryBlock blockOne =
				memory.createInitializedBlock(".test1", getAddr(0), 0x100, (byte) 0, null, false);
			MemoryBlock blockTwo = memory.createInitializedBlock(".test2", getAddr(0x100), 0x200,
				(byte) 0, null, false);
			program.getMemory().join(blockOne, blockTwo);
		});

		JTable table = provider.getTable();
		assertEquals(blocks.length + 1, table.getModel().getRowCount());
		assertEquals(".test1", table.getModel().getValueAt(0, MemoryMapModel.NAME));
	}
Test the MemoryMapPlugin for domain object events.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/memory/MemoryMapPluginTest.java