private void initStackPointer(EmulatorTestRunner testRunner, Register spReg) {
		Program program = testRunner.getProgram();
		Symbol stackSymbol = findAnyMatchingSymbol(program, getPreferredStackSymbolName(), "_stack",
			"stack", "__STACK_START");
		if (stackSymbol != null) {
			long stackOffset = stackSymbol.getAddress().getAddressableWordOffset();
			testRunner.setRegister(spReg.getName(), stackOffset);
			log(null, "Stack Pointer (" + spReg.getName() + ") auto-assigned using symbol '" +
				stackSymbol.getName() + "' offset: 0x" + Long.toHexString(stackOffset));
		}
		else {
			log(null, "Stack Pointer (" + spReg.getName() + ") using default offset: 0");
		}
	}
Single unit test which handles named test group specified during test
instantiation.
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/ProcessorEmulatorTestAdapter.java