private FieldLocation getFieldLocation(Address addr) {

		return runSwing(() -> {
			ByteViewerComponent c = panel.getCurrentComponent();
			ProgramByteBlockSet blockset =
				(ProgramByteBlockSet) plugin.getProvider().getByteBlockSet();
			ByteBlockInfo bbInfo = blockset.getByteBlockInfo(addr);
			return c.getFieldLocation(bbInfo.getBlock(), bbInfo.getOffset());
		});
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java