@Test
	public void testSetGroupSize() throws Exception {

		ByteViewerComponent c = panel.getCurrentComponent();
		panel.setCurrentView(c); // force component to have focus

		goToByte("0x0100100b");

		ByteViewerOptionsDialog dialog = launchByteViewerOptions();
		FixedBitSizeValueField field =
			(FixedBitSizeValueField) getInstanceField("groupSizeField", dialog);

		// verify that the text field has the min address since the
		// current offset is 0

		runSwing(() -> field.setValue(BigInteger.valueOf(2)));
		pressButtonByText(dialog.getComponent(), "OK");

		assertEquals(2, c.getDataModel().getGroupSize());
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java