private long getValue(Enum en, String fieldName) {
		try {
			return en.getValue(fieldName);
		}
		catch (NoSuchElementException e) {
			Assert.fail("Enum does not contain field: " + fieldName + ".\nCurrent fields for " +
				en.getName() + ": " + getFieldNames(en));
			return -1;// can't get here
		}
	}
Tests for editing an Enumerated data type.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/editor/EnumEditor1Test.java