private void assertPosition(ByteViewerComponent view, String expectedFieldText,
			int expectedColumn) {

		String fieldText = runSwing(() -> {
			Field field = view.getCurrentField();
			String text = field.getText();
			return text;
		});
		assertEquals(expectedFieldText, fieldText);

		FieldLocation location = runSwing(() -> view.getCursorLocation());
		assertEquals(expectedColumn, location.getCol());
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java