@Test
	public void testSetAlignedAddress() throws Exception {

		goToByte("0x0100100b");

		ByteViewerOptionsDialog d = launchByteViewerOptions();
		AddressInput ai = (AddressInput) getInstanceField("addressInputField", d);

		// verify that the text field has the min address since the
		// current offset is 0
		assertEquals(program.getMinAddress(), ai.getAddress());

		runSwing(() -> ai.setText("0100100b"));
		pressButtonByText(d.getComponent(), "OK");
		// verify that offset label on the plugin shows '5'
		assertEquals(5, plugin.getProvider().getOffset());
		assertEquals("5", findLabelStr(plugin.getProvider().getComponent(), "Offset"));
		assertEquals("0100100b", findLabelStr(plugin.getProvider().getComponent(), "Insertion"));

		FieldLocation floc = getFieldLocation(addr(0x100101b));
		assertEquals(2, floc.getIndex().intValue());
		assertEquals(0, floc.getFieldNum());

		floc = getFieldLocation(addr(0x100102b));
		assertEquals(3, floc.getIndex().intValue());
		assertEquals(0, floc.getFieldNum());
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java