private void doTextMoveBlock(boolean overlay) throws Exception {
		// add a block at 0, length 0x100
		tx(program, () -> {
			memory.createInitializedBlock(".test", getAddr(0), 0x100, (byte) 0, TaskMonitor.DUMMY,
				overlay);
		});

		MemoryBlock block = program.getMemory().getBlock(".test");
		assertNotNull(block);
		assertEquals(overlay, block.isOverlay());
		Address startAddr = block.getStart();
		Address endAddr = block.getEnd();

		// Select correct row
		AtomicInteger row = new AtomicInteger();
		runSwing(() -> {
			for (int i = 0; i < table.getRowCount(); i++) {
				if (".test".equals(table.getModel().getValueAt(i, 0))) {
					table.setRowSelectionInterval(i, i);
					row.set(i);
					break;
				}
			}
		});

		waitForSwing();

		DockingActionIf action = getAction(plugin, "Move Block");
		assertTrue(action.isEnabled());
		performAction(action, false);

		waitForSwing();
		MoveBlockDialog d = waitForDialogComponent(MoveBlockDialog.class);

		assertNotNull(d);
		assertEquals("Move Memory Block", d.getTitle());

		// verify the labels
		JLabel nameLabel = (JLabel) findComponentByName(d.getComponent(), "blockName");
		assertNotNull(nameLabel);
		assertEquals(".test", nameLabel.getText());

		JLabel origStartLabel = (JLabel) findComponentByName(d.getComponent(), "origStart");
		assertNotNull(origStartLabel);
		assertEquals(startAddr.toString(), origStartLabel.getText());

		JLabel origEndLabel = (JLabel) findComponentByName(d.getComponent(), "origEnd");
		assertNotNull(origEndLabel);
		assertEquals(endAddr.toString(), origEndLabel.getText());

		JLabel lengthLabel = (JLabel) findComponentByName(d.getComponent(), "length");
		assertNotNull(lengthLabel);
		assertEquals("256  (0x100)", lengthLabel.getText());

		AddressInput startField = (AddressInput) findComponentByName(d.getComponent(), "newStart");

		assertNotNull(startField);
		assertEquals(startAddr, startField.getAddress());

		AddressInput endField = (AddressInput) findComponentByName(d.getComponent(), "newEnd");
		assertNotNull(endField);
		assertEquals(endAddr, endField.getAddress());

		JButton okButton = findButton(d.getComponent(), "OK");
		assertNotNull(okButton);
		assertFalse(okButton.isEnabled());

		// move the block to 0x300
		Address newStart = startAddr.getAddressSpace().getAddressInThisSpaceOnly(0x300);
		Address newEnd = startAddr.getAddressSpace().getAddressInThisSpaceOnly(0x3ff);
		runSwing(() -> startField.simulateAddressChanged(newStart));
		assertEquals(newEnd, endField.getAddress());
		assertTrue(okButton.isEnabled());

		runSwing(() -> okButton.getActionListeners()[0].actionPerformed(null));
		// wait for thread to start
		Thread.sleep(1000);

		while (!program.canLock()) {
			Thread.sleep(100);
		}

		program.flushEvents();
		waitForSwing();
		assertEquals(".test", model.getValueAt(row.get(), MemoryMapModel.NAME));
		assertEquals(newStart.toString(), model.getValueAt(row.get(), MemoryMapModel.START));
		assertEquals(newEnd.toString(), model.getValueAt(row.get(), MemoryMapModel.END));
	}
Tests for the actions on the Memory Map provider.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/memory/MemoryMapProvider2Test.java