private Function createFunction()
			throws DuplicateNameException, InvalidInputException, OverlappingFunctionException {

		int txId = program.startTransaction("Transaction");
		try {
			Address addr = program.getAddressFactory().getDefaultAddressSpace().getAddress(0x0);
			Function func1 = program.getFunctionManager().createFunction("func1", addr,
				new AddressSet(addr), SourceType.USER_DEFINED);
			assertNotNull(func1);
			return func1;
		}
		finally {
			program.endTransaction(txId, true);
		}

	}
Constructor that takes the name of the test to run.
Ghidra/Features/Base/src/test/java/ghidra/app/cmd/label/CreateNamespacesCmdTest.java