private Program buildProgram() throws Exception {
		ProgramBuilder builder = new ProgramBuilder("TestX86", ProgramBuilder._X86);

		builder.createMemory(".text", Long.toHexString(0x1001000), 0x6600);
		builder.createMemory(".data", Long.toHexString(0x1008000), 0x600);
		builder.createMemory(".rsrc", Long.toHexString(0x100A000), 0x5400);
		builder.createMemory(".bound_import_table", Long.toHexString(0xF0000248), 0xA8);
		builder.createMemory(".debug_data", Long.toHexString(0xF0001300), 0x1C);

		//create and disassemble a function
		builder.setBytes("0x0100415a",
			"55 8b ec 83 ec 0c 33 c0 c7 45 f8 01 00 00 00 21 45 fc 39 45 08 c7 45 f4 04" +
				" 00 00 00 74 1a 8d 45 f4 50 8d 45 f8 50 8d 45 fc 50 6a 00 ff 75 0c ff 75 08 " +
				"ff 15 08 10 00 01 85 c0 75 06 83 7d fc 04 74 05 8b 45 10 eb 03 8b 45 f8 c9 " +
				"c2 0c 00");
		builder.disassemble("0x0100415a", 0x4d, true);
		builder.createFunction("0x0100415a");

		builder.setBytes("0x01002cf5",
			"55 8b ec 83 7d 14 00 56 8b 35 e0 10 00 01 57 74 09 ff 75 14 ff d6 8b f8 " +
				"eb 02 33 ff ff 75 10 ff d6 03 c7 8d 44 00 02 50 6a 40 ff 15 dc 10 00 01 8b " +
				"f0 85 f6 74 27 56 ff 75 14 ff 75 10 e8 5c ff ff ff ff 75 18 ff 75 0c 56 ff 75" +
				" 08 ff 15 04 12 00 01 56 8b f8 ff 15 c0 10 00 01 eb 14 ff 75 18 ff 75 0c ff 75" +
				"10 ff 75 08 ff 15 04 12 00 01 8b f8 8b c7 5f 5e 5d c2 14");
		builder.disassemble("0x01002cf5", 0x121, true);
		builder.createFunction("0x01002cf5");
		builder.createLabel("0x01002cf5", "ghidra");

//		//create and disassemble some code not in a function
		builder.setBytes("0x010029bd", "ff 15 c4 10 00 01 8b d8 33 f6 3b de 74 06");
		builder.disassemble("0x10029bd", 0xe, true);

		builder.createLabel("0x01001068", "CreateDCW");
		builder.createComment("0x01001068", "CreateDCW", CommentType.EOL);
		builder.createLabel("0x010010b4", "CreateFileW");
		builder.createLabel("0x010012bc", "CreateWindowExW");

		builder.createEncodedString("0x01001708", "Notepad", StandardCharsets.UTF_16BE, true);
		builder.createEncodedString("0x01001740", "something else", StandardCharsets.UTF_16BE,
			true);

		builder.setBytes("0x01006642", "ff 25 c4 12 00 01");
		builder.disassemble("0x01006642", 0x6, true);
		builder.setBytes("0x01006648", "ff 25 c8 12 00 01");
		builder.disassemble("0x01006648", 0x6, true);

//		StructureDataType dt = new StructureDataType("_person", 0);
//		dt.add(new IntegerDataType(), "id", null);
//		dt.add(new ArrayDataType(new AsciiDataType(), 32, 1), "name", null);
//		dt.add(new BooleanDataType(), "likesCheese", null);
//		dt.add(new PointerDataType(dt), "next", null);

		builder.createComment("0x01006642", "EOL comment", CommentType.EOL);
		builder.createComment("0x01006648", "EOL comment", CommentType.EOL);

		return builder.getProgram();
	}
Test the searcher that searches fields in the Code Browser
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcherTest.java