@Test
	public void testSortCommentDescending() {

		JTableHeader header = table.getTableHeader();
		// ascending
		Rectangle rect = header.getHeaderRect(MemoryMapModel.COMMENT);
		clickMouse(header, 1, rect.x, rect.y, 1, 0);

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

		MemoryBlock[] blocks = memory.getBlocks();
		String[] comments = new String[blocks.length];
		for (int i = 0; i < blocks.length; i++) {
			comments[i] = blocks[i].getComment();
			if (comments[i] == null) {
				comments[i] = "";
			}
		}
		Arrays.sort(comments, new StringComparator());

		for (int i = 0; i < comments.length; i++) {
			int idx = comments.length - 1 - i;
			assertEquals(comments[idx], model.getValueAt(i, MemoryMapModel.COMMENT));
		}
	}
Basic tests for the memory map provider.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/memory/MemoryMapProvider1Test.java