@Test
	public void testSortNamesDescending() {
		// ascending
		JTableHeader header = table.getTableHeader();
		Rectangle rect = header.getHeaderRect(MemoryMapModel.NAME);
		clickMouse(header, 1, rect.x, rect.y, 1, 0);

		// descending
		clickMouse(header, 1, rect.x, rect.y, 1, 0);

		MemoryBlock[] blocks = memory.getBlocks();
		String[] names = new String[blocks.length];
		for (int i = 0; i < names.length; i++) {
			names[i] = blocks[i].getName();
		}
		Arrays.sort(names);
		for (int i = 0; i < names.length; i++) {
			int idx = names.length - 1 - i;
			assertEquals(names[idx], model.getValueAt(i, MemoryMapModel.NAME));
		}
	}
Basic tests for the memory map provider.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/memory/MemoryMapProvider1Test.java